summaryrefslogtreecommitdiff
path: root/ext/zlib/zlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/zlib/zlib.c')
-rw-r--r--ext/zlib/zlib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index f3bda6398f..9060dcb2e2 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -777,7 +777,7 @@ static zend_bool zlib_create_dictionary_string(HashTable *options, char **dict,
size_t i;
*++ptr = zval_get_string(cur);
- if (!*ptr || ZSTR_LEN(*ptr) == 0) {
+ if (!*ptr || ZSTR_LEN(*ptr) == 0 || EG(exception)) {
if (*ptr) {
efree(*ptr);
}
@@ -785,7 +785,9 @@ static zend_bool zlib_create_dictionary_string(HashTable *options, char **dict,
efree(ptr);
}
efree(strings);
- php_error_docref(NULL, E_WARNING, "dictionary entries must be non-empty strings");
+ if (!EG(exception)) {
+ php_error_docref(NULL, E_WARNING, "dictionary entries must be non-empty strings");
+ }
return 0;
}
for (i = 0; i < ZSTR_LEN(*ptr); i++) {