Bug #79817 [Ver->Asn]: str_replace() does not handle INDIRECT elements

From: Date: Fri, 10 Jul 2020 11:13:10 +0000
Subject: Bug #79817 [Ver->Asn]: str_replace() does not handle INDIRECT elements
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227931@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79817&edit=1 ID: 79817 Updated by: nikic@php.net Reported by: changochen1 at gmail dot com -Summary: Assertion `0' failed. in __zval_get_string_func +Summary: str_replace() does not handle INDIRECT elements -Status: Verified +Status: Assigned Type: Bug Package: Scripting Engine problem PHP Version: 7.3.20 -Assigned To: +Assigned To: nikic Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2020-07-09 07:10:16] cmb@php.net The problem is that we're passing an IS_INDIRECT value to zval_get_tmp_string()[1] which doesn't expect that. [1] <https://github.com/php/php-src/blob/PHP-7.3/ext/standard/string.c#L4285> ------------------------------------------------------------------------ [2020-07-09 05:36:03] changochen1 at gmail dot com Description: ------------ php: /home/yongheng/php_clean/Zend/zend_operators.c:915: zend_string *__zval_get_string_func(zval *, zend_bool): Assertion `0' failed. Test script: --------------- <? switch ( $a ) { case str_replace('x' , array () , $GLOBALS ); } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=79817&edit=1

« previous php.bugs (#227931) next »