PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-?? ??? 2016 PHP 7.0.11
+?? ??? 2016, PHP 7.1.0RC1
- Core:
- . Fixed bug #72911 (Memleak in zend_binary_assign_op_obj_helper). (Laruence)
- . Fixed bug #72813 (Segfault with __get returned by ref). (Laruence)
- . Fixed bug #72767 (PHP Segfaults when trying to expand an infinite operator).
- (Nikita)
- . Fixed bug #72854 (PHP Crashes on duplicate destructor call). (Nikita)
- . Fixed bug #72857 (stream_socket_recvfrom read access violation). (Anatol)
+ . Fixed bug #72943 (assign_dim on string doesn't reset hval). (Laruence)
+ . Fixed bug #72598 (Reference is lost after array_slice()) (Nikita)
- COM:
. Fixed bug #72922 (COM called from PHP does not return out parameters).
memset(Z_STRVAL_P(str) + old_len, ' ', offset - old_len);
Z_STRVAL_P(str)[offset+1] = 0;
} else if (!Z_REFCOUNTED_P(str)) {
+ old_str = Z_STR_P(str);
Z_STR_P(str) = zend_string_init(Z_STRVAL_P(str), Z_STRLEN_P(str), 0);
Z_TYPE_INFO_P(str) = IS_STRING_EX;
- }
-
- if (Z_TYPE_P(value) != IS_STRING) {
- zend_string *tmp = zval_get_string(value);
-
- Z_STRVAL_P(str)[offset] = ZSTR_VAL(tmp)[0];
- zend_string_release(tmp);
+ zend_string_release(old_str);
} else {
- Z_STRVAL_P(str)[offset] = Z_STRVAL_P(value)[0];
+ SEPARATE_STRING(str);
+ zend_string_forget_hash_val(Z_STR_P(str));
}
- /*
- * the value of an assignment to a string offset is undefined
- T(result->u.var).var = &T->str_offset.str;
- */
- zend_string_release(old_str);
- if (result) {
- zend_uchar c = (zend_uchar)Z_STRVAL_P(str)[offset];
+ Z_STRVAL_P(str)[offset] = c;
+ if (result) {
+ /* Return the new character */
if (CG(one_char_string)[c]) {
ZVAL_INTERNED_STR(result, CG(one_char_string)[c]);
} else {