web design, England, Britain, UK, belgium
 
Ulti Clocks content

Disable Joomla php error reporting with @ (at) symbol

GJC Web Design UK Joomla & VirtueMart how to, tips, tricks, coding examples, html, php, tutorial, 101, useful hints, help

A collection of help articles and coding examples for Joomla & Virtuemart

Belgium, VirtueMart & Joomla Web Design England UK Britain & Germany

Joomla, VirtueMart, how to, tips, tricks, coding examples, html, php, tutorial, 101, useful hints, help sand Disable Joomla php error reporting with @ (at) symbol.
error, code, reporting, notice, catid, php, case, joomla, wouldn, line, article, trim, module, reported, variable, setting, uncooperative, disabling, overriding, propblems, individual, option, easiest, disable, displays, production, server, site, correctly, host, displayed, giving, undefined, means, operation, completely, hasn, doesn, defined, symbol

Home Joomla - VirtueMart Joomla & VM How To's Disable Joomla php error reporting with @ (at) symbol

Mon

07

Dec

Disable Joomla php error reporting with @ (at) symbol
  • Joomla 1.5
  • VirtueMart 1.1

I have had a couple of occasions when uncooperative, client chosen hosts have overridden the Joomla error reporting setting.
In this case unimportant "Notice" errors can be disabled from within the code.



Joomla Disable php error reporting with @ (at) symbol The first step is to open the file in a text editor, that is reported in the error message, in this case plugins/content/ultimate_social_bookmarking_plugin.php on line 77.
The error here is a "Notice:", the lowest level of error that php returns, i.e. an error that won't break the code but is there. It is for you to judge whether it worth trying to fix the php error or just stop it being reported.
If it was a code breaking error then of course it would need to be fixed. Also if the error reporting was switched off completely on the server (as it should be for a production site) then the error wouldn't be displayed anyway.
In this case due to an uncooperative host who wouldn't disable the error reporting and was overriding the Joomla setting disabling the individual error reporting within the code was the easiest option.
So the line 77 giving the error "Notice: Undefined property: stdClass::$catid" was -
if ($article->catid == trim($ex))
Joomla Disable php error reporting with @ (at) symbol just means that $catid hasn't been defined in the code and doesn't effect the operation of the module.
Therefore we can change the code to -
if (@$article->catid == trim($ex))
Notice the @(at) symbol before the variable? This tells the php engine not to report any propblems with this variable.
Now the module displays correctly.



Add this page to your favorite Social Bookmarking websites
Digg! Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! Slashdot! Technorati! StumbleUpon! Spurl! Newsvine! Furl! Fark! Yahoo! Netvouz! Mister-Wong! RawSugar! Ma.gnolia! Squidoo! DZone! Swik!
Last Updated on Monday, 07 December 2009 11:40
 

Add your comment

BoldItalicUnderlineStrikethroughSubscriptSuperscriptEmailImageHyperlinkOrdered listUnordered listQuoteCodeHyperlink to the Article by its id
Very HappySmileWinkSadSurprisedShockedConfusedCoolLaughingMadRazzEmbarrassedCrying or Very SadEvil or Very MadTwisted EvilRolling EyesExclamationQuestionIdeaArrowNeutralMr. GreenGeekUber Geek
Your name:
  The word for verification.
Lowercase letters only with no spaces.

The word for verification.<br/>Lowercase letters only with no spaces.
Word verification:

Subject:
Comment:
Comments (1)
error fixed
1 Monday, 08 February 2010 11:47
Leonard
@ has saved my day. after searching all over the internet on how to fix this problem where a joomla modules was reposting some errors and messing my design, it happened that @ was the answer. Be blesses joomla master.

Our Recommended Reading

For those interested in extending their knowledge of Joomla! & VirtueMart, Packt Publishing has an excellent range of help & how to books.
Listed below are some I can recommend.
Simply click on the images to be taken directly to their web shop.


Joomla! Social Networking with JomSocial
Joomla! Social Networking
with JomSocial

by Kwasi Boateng & Beatrice A. Boateng.
Joomla! 1.5 Multimedia
Joomla! 1.5 Multimedia
by Allan Walker.


Building job sites with Joomla!
Building job sites with Joomla!
by Santonu Kumar Dhar.

Joomla! Template Design: Create your own professional-quality templates with this fast, friendly guide
Joomla! Template Design: 2nd Edition
Create your own professional-quality
templates with this fast, friendly guide
by Tessa Blakeley Silver.
Magento: Beginner's Guide
Magento: Beginner's Guide by William Rice
is a must for anyone trying the
open-source e-Commerce solution.

Read the review

object-oriented-javascript-applications-libraries
Object-Oriented JavaScript by
Stoyan Stefanov gives you a very
comprehensive grounding in
the latest Javascript techniques.

Read the review
Joomla! Web Security
Joomla! Web Security
by Tom Canavan.

Joomla 1.5 Top Extensions Cookbook
Joomla 1.5 Top Extensions Cookbook by
Suhreed Sarkar is an ideal and concise round up of the extensions available for the Joomla! system.

Read the review

Latest Articles

Paypal Donation

If you use this module on your site please donate a small amount.
Any donation amount appreciated.

VM Live Product Search

Recommended Reading

For those interested in extending there knowledge of Joomla! & VirtueMart Packt Publishing has an excellent range of help & how to books.
Listed below are some I can recommend.
Simply click on the images to be taken directly to their web shop.

Mastering Joomla! 1.5 Extension and Framework Development
Mastering Joomla! 1.5 Extension and
Framework Development : 2nd Edition

by James Kennard.
Read the review

Building job sites with Joomla!
Building job sites with Joomla!
by Santonu Kumar Dhar.
Learning Joomla! 1.5 Extension Development Learning Joomla! 1.5 Extension Development
by Joseph L. LeBlanc.
Read the review
Joomla! E-Commerce with VirtueMart
Joomla! E-Commerce with VirtueMart
by Suhreed Sarkar.

Read the review
Joomla! 1.5 Site Blueprints Joomla! 1.5 Site Blueprints
by Timi Ogunjobi.

Joomla! 1.5 JavaScript jQuery Joomla! 1.5 JavaScript jQuery
by Jose Argudo Blanco.
Read the review
Joomla! Social Networking with JomSocial Joomla! Social Networking with JomSocial
by Kwasi Boateng & Beatrice A. Boateng.

Joomla! 1.5 Multimedia Joomla! 1.5 Multimedia
by Allan Walker.

Joomla! Web Security Joomla! Web Security
by Tom Canavan.

Mastering Joomla! 1.5 Extension and Framework Development Mastering Joomla! 1.5 Extension and Framework Development : 2nd Edition
by James Kennard.

Joomla! Template Design: Create your own professional-quality templates with this fast, friendly guide Joomla! Template Design: Edition 2 - Create your own professional-quality templates with this fast, friendly guide
by Tessa Blakeley Silver.

Magento: Beginner's Guide
Magento: Beginner's Guide by William Rice
is a must for anyone trying the
open-source e-Commerce solution.

Read the review

GJC Web Design UK Joomla & VirtueMart how to, tips, tricks, coding examples, html, php, tutorial, 101, useful hints, help

A collection of help articles and coding examples for Joomla & Virtuemart

Belgium, VirtueMart & Joomla Web Design England UK Britain & Germany

Joomla, VirtueMart, how to, tips, tricks, coding examples, html, php, tutorial, 101, useful hints, help



Disable Joomla php error reporting with @ (at) symbol



Disable Joomla php error reporting with @ (at) symbol.


error, code, reporting, notice, catid, php, case, joomla, wouldn, line, article, trim, module, reported, variable, setting, uncooperative, disabling, overriding, propblems, individual, option, easiest, disable, displays, production, server, site, correctly, host, displayed, giving, undefined, means, operation, completely, hasn, doesn, defined, symbol