Skip to content

Commit 8cd1dcb

Browse files
committed
Fix SensitiveParameter dumping
1 parent 73138be commit 8cd1dcb

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Zend/zend_attributes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ ZEND_METHOD(SensitiveParameterValue, __debugInfo)
138138

139139
static HashTable *attributes_sensitive_parameter_value_get_properties_for(zend_object *zobj, zend_prop_purpose purpose)
140140
{
141-
return NULL;
141+
return (HashTable*)&zend_empty_array;
142142
}
143143

144144
ZEND_METHOD(Override, __construct)

Zend/zend_object_handlers.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,15 @@ typedef void (*zend_object_unset_property_t)(zend_object *object, zend_string *m
8282
/* Used to remove a dimension of the object */
8383
typedef void (*zend_object_unset_dimension_t)(zend_object *object, zval *offset);
8484

85-
/* Used to get hash of the properties of the object, as hash of zval's */
85+
/* Used to get hash of the properties of the object, as hash of zval's
86+
* Must only return NULL when an exception occurs, if no properties
87+
* return (HashTable*)&zend_empty_array;
88+
*/
8689
typedef HashTable *(*zend_object_get_properties_t)(zend_object *object);
8790

91+
/* Must only return NULL when an exception occurs, if no properties
92+
* return (HashTable*)&zend_empty_array;
93+
*/
8894
typedef HashTable *(*zend_object_get_debug_info_t)(zend_object *object, int *is_temp);
8995

9096
typedef enum _zend_prop_purpose {

0 commit comments

Comments
 (0)