laruence                                 Fri, 30 Sep 2011 13:34:07 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=317493

Log:
Fix wrong codes #55817

Bug: https://bugs.php.net/55817 (Assigned) Wrong codes of mb_detect_encoding
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/mbstring/mbstring.c
    U   php/php-src/branches/PHP_5_4/ext/mbstring/mbstring.c
    U   php/php-src/trunk/ext/mbstring/mbstring.c

Modified: php/php-src/branches/PHP_5_3/ext/mbstring/mbstring.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mbstring/mbstring.c        2011-09-30 
12:31:59 UTC (rev 317492)
+++ php/php-src/branches/PHP_5_3/ext/mbstring/mbstring.c        2011-09-30 
13:34:07 UTC (rev 317493)
@@ -3017,7 +3017,7 @@
        /* make encoding list */
        list = NULL;
        size = 0;
-       if (ZEND_NUM_ARGS() >= 2 && Z_STRVAL_P(encoding_list)) {
+       if (ZEND_NUM_ARGS() >= 2) {
                switch (Z_TYPE_P(encoding_list)) {
                case IS_ARRAY:
                        if (!php_mb_parse_encoding_array(encoding_list, &list, 
&size, 0 TSRMLS_CC)) {

Modified: php/php-src/branches/PHP_5_4/ext/mbstring/mbstring.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/mbstring/mbstring.c        2011-09-30 
12:31:59 UTC (rev 317492)
+++ php/php-src/branches/PHP_5_4/ext/mbstring/mbstring.c        2011-09-30 
13:34:07 UTC (rev 317493)
@@ -3183,7 +3183,7 @@
        /* make encoding list */
        list = NULL;
        size = 0;
-       if (ZEND_NUM_ARGS() >= 2 && Z_STRVAL_P(encoding_list)) {
+       if (ZEND_NUM_ARGS() >= 2) {
                switch (Z_TYPE_P(encoding_list)) {
                case IS_ARRAY:
                        if (FAILURE == 
php_mb_parse_encoding_array(encoding_list, &list, &size, 0 TSRMLS_CC)) {

Modified: php/php-src/trunk/ext/mbstring/mbstring.c
===================================================================
--- php/php-src/trunk/ext/mbstring/mbstring.c   2011-09-30 12:31:59 UTC (rev 
317492)
+++ php/php-src/trunk/ext/mbstring/mbstring.c   2011-09-30 13:34:07 UTC (rev 
317493)
@@ -3190,7 +3190,7 @@
        /* make encoding list */
        list = NULL;
        size = 0;
-       if (ZEND_NUM_ARGS() >= 2 && Z_STRVAL_P(encoding_list)) {
+       if (ZEND_NUM_ARGS() >= 2) {
                switch (Z_TYPE_P(encoding_list)) {
                case IS_ARRAY:
                        if (FAILURE == 
php_mb_parse_encoding_array(encoding_list, &list, &size, 0 TSRMLS_CC)) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to