Bug #17569: array_push creates array if var is not set
| From: | tim at timcrider dot com | Date: | Sun, 02 Jun 2002 23:47:15 +0000 |
| Subject: | Bug #17569: array_push creates array if var is not set | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-9256@lists.php.net to get a copy of this message | ||
From: tim@timcrider.com
Operating system: Linux
PHP version: 4.2.1
PHP Bug Type: Feature/Change Request
Bug description: array_push creates array if var is not set
Right now if you call array_push and the array parameter is not set, it
gives the error
Warning: First argument to array_push() needs to be an array in FILE on
line NUM
array_push should check to see if the variable is set or NULL. Only if it
is NULL should it create a new array. If there is already something
assigned to the var it should do nothing.
--
Edit bug report at http://bugs.php.net/?id=17569&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17569&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17569&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17569&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17569&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17569&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17569&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17569&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17569&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17569&r=globals