|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-04-01 22:51 UTC] judas dot iscariote at gmail dot com
[2007-04-02 09:06 UTC] Webbed dot Pete at gmail dot com
[2007-04-03 18:47 UTC] tony2001@php.net
[2007-04-03 21:02 UTC] Webbed dot Pete at gmail dot com
[2007-04-03 21:10 UTC] tony2001@php.net
[2007-04-03 21:16 UTC] Webbed dot Pete at gmail dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 28 05:00:01 2025 UTC |
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.