On 17/09/2009, at 8:05 AM, craiganz wrote:

> Try:
> error_reporting( E_ALL | E_STRICT | E_NOTICE );
>
> Neither E_ALL (warnings and errors only) or E_STRICT (forward
> compatibility) turns on notices.  The construct being used isn't
> deprecated, nor is it an error :-)

Just a minor clarification - E_ALL | E_NOTICE === E_ALL.

E_NOTICE has a value of 8 and E_ALL has a value of 30719 (4th bit also  
on) so no need to explicitly specify E_NOTICE.

You're right about E_STRICT though on the other hand, it evaluates to  
2048 (12th bit on) which is the only bit not set on by E_ALL.

I have to agree with those advocating against suppressing errors with  
'@' - in my experience it tends to be a warning sign that the code  
might not be up to scratch.    You're not going to get notices  
breaking layout in production - you have display_errors off, logging  
to file, and emailing you the logs right? :) - and it's a good habit  
to check for issues first before making the call and/or trap anything  
unexpected.


Kind regards,
James McGlinn
__________________________________
CTO
Eventfinder Limited
Suite 106, Heards Building
2 Ruskin Street, Parnell, Auckland 1052
Phone: +649 365 2342
Mobile: +6421 633 234

[email protected]  |  www.eventfinder.co.nz


--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to