Bug #76383 [Opn->Csd]: array_map on $GLOBALS returns IS_INDIRECT

From: Date: Sun, 27 May 2018 22:48:44 +0000
Subject: Bug #76383 [Opn->Csd]: array_map on $GLOBALS returns IS_INDIRECT
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-215394@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76383&edit=1 ID: 76383 Updated by: bwoebi@php.net Reported by: bwoebi@php.net Summary: array_map on $GLOBALS returns IS_INDIRECT -Status: Open +Status: Closed Type: Bug Package: Reproducible crash Operating System: Irrelevant PHP Version: 7.2Git-2018-05-27 (Git) Block user comment: N Private report: N New Comment: Automatic comment on behalf of bobwei9@hotmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=97a84831432a9b727235ee4727905919681aeac4 Log: Fixed bug #76383 (array_map on $GLOBALS returns IS_INDIRECT) Previous Comments: ------------------------------------------------------------------------ [2018-05-27 22:47:00] bwoebi@php.net Description: ------------ Since PHP 7, an array_map on $GLOBALS returns an IS_INDIRECT zval instead of a value. Test script: --------------- array_map(function($x) use (&$lastval) { $lastval = $x; }, $GLOBALS); extract([], 0, $lastval); // for example, anything that will fail on an invalid type // or for direct proof, giving unknown type var_dump(gettype($lastval)); Expected result: ---------------- NULL // on gettype Actual result: -------------- Assertion failed: (0), function _convert_to_string, file /Users/Bob/php-src-X/Zend/zend_operators.c, line 585. Abort trap: 6 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76383&edit=1

« previous php.bugs (#215394) next »