mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Fix infinite loop on string offset during by-ref list assign
This commit is contained in:
commit
605ee9c8eb
16
Zend/tests/list_assign_ref_string_offset_error.phpt
Normal file
16
Zend/tests/list_assign_ref_string_offset_error.phpt
Normal file
@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
String offset error during list() by-ref assignment
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$a = [0];
|
||||
$v = 'b';
|
||||
$i = 0;
|
||||
list(&$a[$i++]) = $v;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Error: Cannot create references to/from string offsets in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line %d
|
@ -1512,6 +1512,7 @@ static zend_never_inline ZEND_COLD void zend_wrong_string_offset(EXECUTE_DATA_D)
|
||||
msg = "Cannot create references to/from string offsets";
|
||||
break;
|
||||
}
|
||||
opline++;
|
||||
}
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE();
|
||||
|
Loading…
Reference in New Issue
Block a user