1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.2' into PHP-8.3

This commit is contained in:
Niels Dossche
2024-10-05 10:18:56 +02:00
3 changed files with 19 additions and 1 deletions

4
NEWS
View File

@@ -53,6 +53,10 @@ PHP NEWS
. Fixed bug GH-16181 (phpdbg: exit in exception handler reports fatal error).
(cmb)
- Reflection:
. Fixed bug GH-16187 (Assertion failure in ext/reflection/php_reflection.c).
(DanielEScherzer)
- SimpleXML:
. Fixed bug GH-15837 (Segmentation fault in ext/simplexml/simplexml.c).
(nielsdos)

View File

@@ -476,7 +476,7 @@ static void _class_string(smart_str *str, zend_class_entry *ce, zval *obj, char
count = 0;
if (properties && zend_hash_num_elements(properties)) {
ZEND_HASH_MAP_FOREACH_STR_KEY(properties, prop_name) {
ZEND_HASH_FOREACH_STR_KEY(properties, prop_name) {
if (prop_name && ZSTR_LEN(prop_name) && ZSTR_VAL(prop_name)[0]) { /* skip all private and protected properties */
if (!zend_hash_exists(&ce->properties_info, prop_name)) {
count++;

View File

@@ -0,0 +1,14 @@
--TEST--
GH-16187 (ReflectionClass::__toString() with unpacked properties)
--EXTENSIONS--
simplexml
--FILE--
<?php
$xml = '<form name="test"></form>';
$simplexml = simplexml_load_string($xml);
$reflector = new ReflectionObject($simplexml['name']);
$reflector->__toString();
?>
DONE
--EXPECT--
DONE