com php-src: Call zpp_none in PharFileInfo::__des truct(): ext/phar/phar_object.c
| From: | Nikita Popov | Date: | Tue, 21 Jul 2020 08:18:33 +0000 |
| Subject: | com php-src: Call zpp_none in PharFileInfo::__des truct(): ext/phar/phar_object.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-112266@lists.php.net to get a copy of this message | ||
Commit: 2160f5ce599e335b404f93233971329b6bc510f0
Author: Nikita Popov <nikita.ppv@gmail.com> Mon, 20 Jul 2020 16:39:43 +0200
Parents: 50de334d266f015833a3471665405adc8faa9af4
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2160f5ce599e335b404f93233971329b6bc510f0
Log:
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.
Changed paths:
M ext/phar/phar_object.c
Diff:
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);