Skip to content

Commit

Permalink
Remove unnecessary HASH_OF uses in mbstring
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed Oct 11, 2018
1 parent 2c7be42 commit 900ee57
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ext/mbstring/mbstring.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 900ee57

Please sign in to comment.