From: Rasmus Lerdorf Date: Sun, 26 Jul 2009 15:53:36 +0000 (+0000) Subject: Please review this one. It seems pretty fundamental. X-Git-Tag: php-5.4.0alpha1~191^2~2958 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=415795f8278ec6fa84a370d58953a1e7614243dc;p=php Please review this one. It seems pretty fundamental. When $str is a binary string and you do: $str[4]=0; there should be no unicode conversion. --- diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index aa592fd460..822a2ddcf0 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -649,7 +649,7 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, zval static inline int zend_assign_to_string_offset(const temp_variable *T, const zval *value, int value_type TSRMLS_DC) /* {{{ */ { - if (Z_TYPE_P(T->str_offset.str) == IS_STRING && Z_TYPE_P(value) != IS_STRING) { + if (Z_TYPE_P(T->str_offset.str) == IS_STRING && Z_TYPE_P(value) == IS_UNICODE) { convert_to_unicode(T->str_offset.str); }