mirror of
https://github.com/php/php-src.git
synced 2024-09-23 10:57:26 +00:00
Merge branch 'PHP-7.0'
This commit is contained in:
commit
cc98663fcd
@ -109,8 +109,13 @@ static void zend_ini_add_string(zval *result, zval *op1, zval *op2)
|
||||
ZVAL_PSTRINGL(op1, str->val, str->len);
|
||||
zend_string_release(str);
|
||||
}
|
||||
|
||||
op1_len = (int)Z_STRLEN_P(op1);
|
||||
|
||||
if (Z_TYPE_P(op2) != IS_STRING) {
|
||||
zend_string *str = zval_get_string(op2);
|
||||
ZVAL_PSTRINGL(op2, str->val, str->len);
|
||||
zend_string_release(str);
|
||||
}
|
||||
length = op1_len + (int)Z_STRLEN_P(op2);
|
||||
|
||||
ZVAL_NEW_STR(result, zend_string_extend(Z_STR_P(op1), length, 1));
|
||||
|
12
ext/standard/tests/general_functions/bug70947.phpt
Normal file
12
ext/standard/tests/general_functions/bug70947.phpt
Normal file
@ -0,0 +1,12 @@
|
||||
--TEST--
|
||||
Bug #70947 (INI parser segfault with INI_SCANNER_TYPED)
|
||||
--FILE--
|
||||
<?php
|
||||
$o = parse_ini_string('foo = bar 123', FALSE, INI_SCANNER_TYPED);
|
||||
var_dump($o);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
string(7) "bar 123"
|
||||
}
|
Loading…
Reference in New Issue
Block a user