E_NOTICE should warn of uninitialized arrays
| From: | Jakub Vrana | Date: | Tue, 01 Nov 2005 13:37:33 +0000 |
| Subject: | E_NOTICE should warn of uninitialized arrays | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-19883@lists.php.net to get a copy of this message | ||
Hello!
E_NOTICE warns of uninitialized variables but doesn't warn of adding
elements to an uninitialized array ($a[] = 5). It is a very similar
problem so E_NOTICE should warn of it either.
It's the same bad practice as working with uninitialized variables
with the same security risks and IMHO the programmer should be warned
of it.
There is a bug regarding this topic marked as bogus by Iliia:
http://bugs.php.net/bug.php?id=28151
Is current behavior really expected and wanted?
Jakub Vrana