From: Nikita Popov Date: Mon, 20 Jul 2020 14:39:43 +0000 (+0200) Subject: Call zpp_none in PharFileInfo::__destruct() X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2160f5ce599e335b404f93233971329b6bc510f0;p=php Call zpp_none in PharFileInfo::__destruct() Using __destruct() with internal classes is dubious, but not so simple to avoid here because the code extends SPL classes. --- diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 4766c2be1d..74f1ea4b73 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -4456,6 +4456,10 @@ PHP_METHOD(PharFileInfo, __destruct) zval *zobj = ZEND_THIS; phar_entry_object *entry_obj = (phar_entry_object*)((char*)Z_OBJ_P(zobj) - Z_OBJ_P(zobj)->handlers->offset); + if (zend_parse_parameters_none() == FAILURE) { + RETURN_THROWS(); + } + if (entry_obj->entry && entry_obj->entry->is_temp_dir) { if (entry_obj->entry->filename) { efree(entry_obj->entry->filename);