ID: 40967
Comment by: judas dot iscariote at gmail dot com
Reported By: Webbed dot Pete at gmail dot com
Status: Open
Bug Type: Reproducible crash
Operating System: Linux
PHP Version: 5.2.1
New Comment:
Then tell use what the.. the getarray() function does **exactly**
Previous Comments:
------------------------------------------------------------------------
[2007-03-31 15:06:34] Webbed dot Pete at gmail dot com
Description:
------------
If I do
{
$from=getarray();
$tgt=array_merge($to,$from);
}
all is well. But if I do
{
$tgt=array_merge($to,getarray());
}
then the page blows up with a 500 internal server error (and getarray()
is never called).
I can't (yet) duplicate this as a simple test case; it only happens in
the middle of a large site source base.
This is on an Apache server (1.3.37) with PHP 5.2.1 running as CGI.
The *really* painful part is the 500 Internal Server Error, with no PHP
error messages of any kind. Made it incredibly painful to track this
down ;)
Reproduce code:
---------------
See above. I've not yet got a simple test case. All of the following
produce the 500 error:
$tgt=array_merge($to,getarray());
$tgt=array_merge($to,$from=getarray());
$tgt=array_merge($to,(array)getarray());
Only if the getarray() call is outside the array_merge() does it
succeed.
Expected result:
----------------
a) No error
b) Better debugability of 500 Internal Server Errors caused by PHP
Actual result:
--------------
500 Internal Server Error with no other message.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40967&edit=1