Ulti Clocks content

Disable Joomla php error reporting with @ (at) symbol

JOOMLABOTTOM 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

Lun

07

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_UPDATED2 Read : 3202 times
 
Comments (1)
error fixed
1 Lundi, 08 Février 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.

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:
Titre:
Comment:

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.

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! Web Security Joomla! Web Security
by Tom Canavan.

Mastering Joomla! 1.5 Extension and Framework Development Mastering Joomla! 1.5 Extension and Framework Development
by James Kennard.

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

JOOMLABOTTOM



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