The problem with ignoring E_NOTICE is also that once you got 500 of them
coming up if turned on, its hardly possible to find a typo.

Therefore it may look cumbersome, but is necessary to use isset everywhere
to keep in control of debug time.

Kind regards,
Jochen

Mobile: 021 567 853
Phone: 09 630 3425
Email: [email protected]
Skype: jochendaum
Web: www.automatem.co.nz

On Sep 17, 2009 8:06 AM, "craiganz" <[email protected]> wrote:


Hi,
Certainly an alternative way to write clean code is to use symfony or
simply to always use your own function to hide the ugliness of this:

       function getArrayElem($ary, $elm, $def=null) {
               return (isset($ary[$elm])) ? $ary[$elm] : $def;
       }

Of course if you use symfony, you're simply passing the use of both
this construct:
 (isset($ary[$elm])) ? $ary[$elm] : null
and this one:
 @$ary[$elm]
to someone else's code :-)

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 :-)

-Craig

On Sep 16, 7:43 pm, Sid Bachtiar <[email protected]> wrote: > Sure, I'm
not arguing for the u...

--~--~---------~--~----~------------~-------~--~----~ NZ PHP Users Group:
http://groups.google.com/g...

--~--~---------~--~----~------------~-------~--~----~
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