[PHP] error_reporting(E_ALL) and undefined vars

2002-02-07 Thread Julio Nobrega Trabalhando

  Hi All,

  I develop with error_reporting(E_ALL). It's a major pain to type everytime

if(isset($some_var))

  To avoid undefined variable errors. Any tips? If you turn E_ALL on
error_reporting, what do you do?

--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] error_reporting(E_ALL) and undefined vars

2002-02-07 Thread Jon Haworth

 I develop with error_reporting(E_ALL). It's a major pain to type everytime
 
 if(isset($some_var))
 
 To avoid undefined variable errors. Any tips? If you turn E_ALL on
 error_reporting, what do you do?

Generally I make sure my variables are defined, and if I can't be sure I
use...

if (isset ($some_var))

That's the *point* of turning on E_ALL. If you don't like it, bump it up to
a higher level.

Cheers
Jon

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] error_reporting(E_ALL) and undefined vars

2002-02-07 Thread Julio Nobrega Trabalhando

  Thanks Jon.

  But, that's for security, right? Maybe even other reasons. I know close to
zero of programming theory, so, why is it bad to have undefined vars on the
code?

--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php