Re: Undefined variables
| From: | Lars Torben Wilson | Date: | Sun, 31 Mar 2002 01:50:49 +0000 |
| Subject: | Re: Undefined variables | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-90845@lists.php.net to get a copy of this message | ||
On Sat, 2002-03-30 at 17:43, Shane Wright wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> > Not really. You either have to init your variables or turn off notices
> > in error_reporting() (or otherwise suppress them; i.e. display_errors =
> > off).
>
> initialising them with safe defaults is the thing to do - the point of the
> error is to warn about uninitialised variables (which, if register_globals is
> on, could be used by an attacker to make your scripts to bad things...)
>
> - --
> Shane
Yes, this is my standard suggestion as well, but since Ernesto seemed
to be aware of the issues I decided not to press the point.
--
Torben Wilson <torben@php.net>
http://www.thebuttlesschaps.com
http://www.hybrid17.com
http://www.inflatableeye.com
+1.604.709.0506