Bug #65251 [Opn]: array_merge_recursive() recursion detection broken
| From: | arpad@php.net | Date: | Sun, 21 Jul 2013 17:02:00 +0000 |
| Subject: | Bug #65251 [Opn]: array_merge_recursive() recursion detection broken | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-180391@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65251&edit=1
ID: 65251
Updated by: arpad@php.net
Reported by: maarten@php.net
Summary: array_merge_recursive() recursion detection broken
Status: Open
Type: Bug
Package: Arrays related
PHP Version: 5.5.0
Block user comment: N
Private report: N
New Comment:
Broken by rev eea093b4 (fixing #42177)
Previous Comments:
------------------------------------------------------------------------
[2013-07-12 13:30:55] maarten@php.net
Description:
------------
<?php
array_merge_recursive$GLOBALS,$GLOBALS)
?>
No longer detects recursion.
It was fixed at the time (https://bugs.php.net/bug.php?id=16064 ) and fix did work until PHP 5.3.26
However PHP 5.4.0 shows a regression, still present in recent 5.4 and 5.5.
See: http://3v4l.org/PfuC8
Test script:
---------------
<?php
array_merge_recursive($GLOBALS,$GLOBALS)
Expected result:
----------------
Warning: array_merge_recursive(): recursion detected in [...] on line 2
Actual result:
--------------
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes) in [...]
on line 2
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65251&edit=1