summaryrefslogtreecommitdiff
path: root/ext/phar/phar_object.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-07-05 16:56:52 +0300
committerDmitry Stogov <dmitry@zend.com>2018-07-05 16:56:52 +0300
commit43d5a3665ddc8b871ccdcd10c4ffde408cd28d35 (patch)
tree6c706c8cc612adcf249439fdb7974ff1652009b9 /ext/phar/phar_object.c
parentd0a6b1009f8066ca16fd1c947183c8499c2cd95e (diff)
downloadphp-git-43d5a3665ddc8b871ccdcd10c4ffde408cd28d35.tar.gz
It's safer to use zval_ptr_dtor() for iterator keys.
Diffstat (limited to 'ext/phar/phar_object.c')
-rw-r--r--ext/phar/phar_object.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c
index 2e351454f3..2c404ca90b 100644
--- a/ext/phar/phar_object.c
+++ b/ext/phar/phar_object.c
@@ -1439,7 +1439,7 @@ static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */
}
if (Z_TYPE(key) != IS_STRING) {
- zval_dtor(&key);
+ zval_ptr_dtor(&key);
zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %s returned an invalid key (must return a string)", ZSTR_VAL(ce->name));
return ZEND_HASH_APPLY_STOP;
}
@@ -1567,7 +1567,7 @@ phar_spl_fileinfo:
}
if (Z_TYPE(key) != IS_STRING) {
- zval_dtor(&key);
+ zval_ptr_dtor(&key);
zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Iterator %s returned an invalid key (must return a string)", ZSTR_VAL(ce->name));
return ZEND_HASH_APPLY_STOP;
}