php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69756 Fatal error: Nesting level too deep - recursive dependency? with ===
Submitted: 2015-06-04 06:59 UTC Modified: 2015-06-05 06:21 UTC
From: jbboehr at gmail dot com Assigned: dmitry (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: master-Git-2015-06-04 (Git) OS: Ubuntu 14.04
Private report: No CVE-ID: None
 [2015-06-04 06:59 UTC] jbboehr at gmail dot com
Description:
------------
The script below causes a fatal error on git master. Currently works as expected on PHP 5.3 - 5.6.

Perhaps related to https://bugs.php.net/bug.php?id=62171

Test script:
---------------
<?php
$arr = new \ArrayObject(array('a'));
foreach( $arr as $item );
var_dump($arr->getArrayCopy() === array('a'));



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-04 12:07 UTC] cmb@php.net
-Status: Open +Status: Verified
 [2015-06-04 12:07 UTC] cmb@php.net
Verified: <http://3v4l.org/cRLAq>.
 [2015-06-05 06:21 UTC] laruence@php.net
-Assigned To: +Assigned To: dmitry
 [2015-06-05 06:21 UTC] laruence@php.net
An more simpler reproduce case is:

<?php
$arr = range(1, 2);
foreach($arr as &$item ) {
    var_dump($arr === array(1, 2));
}
?>


and a recommend fix is here: http://pastebin.com/1CkVLeaC
 [2015-06-05 07:05 UTC] dmitry@php.net
Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ed5fbf5e49eab435cd7a0a9a5627698de92887c1
Log: Fixed bug #69756 (Fatal error: Nesting level too deep - recursive dependency? with ===)
 [2015-06-05 07:05 UTC] dmitry@php.net
-Status: Verified +Status: Closed
 [2016-07-20 11:38 UTC] davey@php.net
Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ed5fbf5e49eab435cd7a0a9a5627698de92887c1
Log: Fixed bug #69756 (Fatal error: Nesting level too deep - recursive dependency? with ===)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC