cvs: php-src /ext/standard string.c

From: Date: Fri, 10 Nov 2006 12:01:50 +0000
Subject: cvs: php-src /ext/standard string.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-41446@lists.php.net to get a copy of this message
andrei Fri Nov 10 12:01:50 2006 UTC Modified files: /php-src/ext/standard string.c Log: Allow mixing Unicode/binary string types. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.609&r2=1.610&diff_format=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.609 php-src/ext/standard/string.c:1.610 --- php-src/ext/standard/string.c:1.609 Wed Oct 11 14:30:50 2006 +++ php-src/ext/standard/string.c Fri Nov 10 12:01:50 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.609 2006/10/11 14:30:50 iliaa Exp $ */ +/* $Id: string.c,v 1.610 2006/11/10 12:01:50 andrei Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -1179,26 +1179,12 @@ while (zend_hash_get_current_data_ex(Z_ARRVAL_P(arr), (void **)&tmp, &pos) == SUCCESS) { if (Z_TYPE_PP(tmp) != return_type) { if (return_type == IS_UNICODE) { - if (Z_TYPE_PP(tmp) == IS_STRING) { - /* ERROR */ - php_error_docref(NULL TSRMLS_CC, E_WARNING, - "Cannot mix binary strings with other string types"); - efree(Z_USTRVAL_P(retval)); - ZVAL_FALSE(retval); - return; - } else { + if (Z_TYPE_PP(tmp) != IS_UNICODE) { SEPARATE_ZVAL(tmp); convert_to_unicode_ex(tmp); } } else if (return_type == IS_STRING) { - if (Z_TYPE_PP(tmp) == IS_UNICODE) { - /* ERROR */ - php_error_docref(NULL TSRMLS_CC, E_WARNING, - "Cannot mix binary strings with other string types"); - efree(Z_STRVAL_P(retval)); - ZVAL_FALSE(retval); - return; - } else { + if (Z_TYPE_PP(tmp) != IS_STRING) { SEPARATE_ZVAL(tmp); convert_to_string_ex(tmp); }

« previous php.cvs (#41446) next »