Skip to content

Commit 859f472

Browse files
committed
Minor fix and improvement
1 parent 5584811 commit 859f472

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/zlib/zlib.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -810,9 +810,8 @@ static bool zlib_create_dictionary_string(HashTable *options, char **dict, size_
810810

811811
zval *cur;
812812
ZEND_HASH_FOREACH_VAL(dictionary, cur) {
813-
zend_string *string = zval_get_string(cur);
814-
ZEND_ASSERT(string);
815-
if (EG(exception)) {
813+
zend_string *string = zval_try_get_string(cur);
814+
if (string == NULL) {
816815
result = 0;
817816
break;
818817
}
@@ -855,6 +854,7 @@ static bool zlib_create_dictionary_string(HashTable *options, char **dict, size_
855854
return 0;
856855
}
857856
}
857+
return 1;
858858
}
859859

860860
/* {{{ Initialize an incremental inflate context with the specified encoding */

0 commit comments

Comments
 (0)