com php-src: Fixed Bug #73803 Reflection of ZipArchive does not show public properties: ext/zip/php_zip.c

[email protected] (Remi Collet)
Newsgroups php.cvs
Message-ID <[email protected]>
Commit:    908029bbc0e7e504bd03956ba11555bb02cef889
Author:    Remi Collet <[email protected]>         Tue, 21 Mar 2017 11:15:45 +0100
Parents:   4afce8ec8c6660ebd9f9eb174d2614361d1c6129
Branches:  master

Link:       http://git.php.net/?p=php-src.git;a=commitdiff;h=908029bbc0e7e504bd03956ba11555bb02cef889

Log:
Fixed Bug #73803 Reflection of ZipArchive does not show public properties

Bugs:
https://bugs.php.net/73803

Changed paths:
  M  ext/zip/php_zip.c


Diff:
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c
index 03f2184..394819c 100644
--- a/ext/zip/php_zip.c
+++ b/ext/zip/php_zip.c
@@ -801,6 +801,9 @@ static void php_zip_register_prop_handler(HashTable *prop_handler, char *name, z
 	hnd.read_const_char_from_obj_func = read_char_from_obj_func;
 	hnd.type = rettype;
 	zend_hash_str_add_mem(prop_handler, name, strlen(name), &hnd, sizeof(zip_prop_handler));
+
+	/* Register for reflection */
+	zend_declare_property_null(zip_class_entry, name, strlen(name), ZEND_ACC_PUBLIC);
 }
 /* }}} */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.