|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-01-28 00:27 UTC] a at b dot c dot de
[2005-02-02 11:38 UTC] stas@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 19:00:02 2025 UTC |
Description: ------------ Using array_walk will crash PHP if a method of an uninstantiated object variable is used in the callback method. Other functions that take variables (at least, usort(), array_map(), array_reduce()) error out instead. There has to be at least one element in the array being walked. Reproduce code: --------------- $array = array('at least one element'); array_walk($array, array($nonesuchvar,'show')); Expected result: ---------------- PHP 4.3.10's error message for this situation reads: Warning: array_walk(): Unable to call Array() - function does not exist in ... while PHP 5.0.3 also reports a Notice-level message that $nonesuchvar is undefined. Actual result: -------------- A Notice-level message that $nonesuchvar is undefined, then a Windows core dump.