]> granicus.if.org Git - php/commitdiff
Remove unnecessary HASH_OF uses in mbstring
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 11 Oct 2018 10:49:33 +0000 (12:49 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 11 Oct 2018 11:04:08 +0000 (13:04 +0200)
ext/mbstring/mbstring.c

index cdecd99385f47e95dff608c1d23614741ff48387..bfda20aa7508a459b4c32d9514c98abd4b0a5d32 100644 (file)
@@ -3149,7 +3149,7 @@ MBSTRING_API HashTable *php_mb_convert_encoding_recursive(HashTable *input, cons
                                ZVAL_COPY(&entry_tmp, entry);
                                break;
                        case IS_ARRAY:
-                               chash = php_mb_convert_encoding_recursive(HASH_OF(entry), _to_encoding, _from_encodings);
+                               chash = php_mb_convert_encoding_recursive(Z_ARRVAL_P(entry), _to_encoding, _from_encodings);
                                if (chash) {
                                        ZVAL_ARR(&entry_tmp, chash);
                                } else {
@@ -3248,7 +3248,7 @@ PHP_FUNCTION(mb_convert_encoding)
                }
        } else {
                HashTable *tmp;
-               tmp = php_mb_convert_encoding_recursive(HASH_OF(input), arg_new, _from_encodings);
+               tmp = php_mb_convert_encoding_recursive(Z_ARRVAL_P(input), arg_new, _from_encodings);
                RETURN_ARR(tmp);
        }
 
@@ -4755,7 +4755,7 @@ MBSTRING_API int php_mb_check_encoding_recursive(HashTable *vars, const zend_str
                                }
                                break;
                        case IS_ARRAY:
-                               if (!php_mb_check_encoding_recursive(HASH_OF(entry), enc)) {
+                               if (!php_mb_check_encoding_recursive(Z_ARRVAL_P(entry), enc)) {
                                        valid = 0;
                                        break;
                                }
@@ -4811,7 +4811,7 @@ PHP_FUNCTION(mb_check_encoding)
                        }
                        break;
                case IS_ARRAY:
-                       if (!php_mb_check_encoding_recursive(HASH_OF(input), enc)) {
+                       if (!php_mb_check_encoding_recursive(Z_ARRVAL_P(input), enc)) {
                                RETURN_FALSE;
                        }
                        break;