Skip to content

Commit 01cbb59

Browse files
committed
Accept zend_object* in zend_unset_property
1 parent 978b7de commit 01cbb59

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

Zend/zend_API.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -4007,15 +4007,15 @@ ZEND_API void zend_update_property_null(zend_class_entry *scope, zval *object, c
40074007
}
40084008
/* }}} */
40094009

4010-
ZEND_API void zend_unset_property(zend_class_entry *scope, zval *object, const char *name, size_t name_length) /* {{{ */
4010+
ZEND_API void zend_unset_property(zend_class_entry *scope, zend_object *object, const char *name, size_t name_length) /* {{{ */
40114011
{
40124012
zend_string *property;
40134013
zend_class_entry *old_scope = EG(fake_scope);
40144014

40154015
EG(fake_scope) = scope;
40164016

40174017
property = zend_string_init(name, name_length, 0);
4018-
Z_OBJ_HT_P(object)->unset_property(Z_OBJ_P(object), property, 0);
4018+
object->handlers->unset_property(object, property, 0);
40194019
zend_string_release_ex(property, 0);
40204020

40214021
EG(fake_scope) = old_scope;

Zend/zend_API.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ ZEND_API void zend_update_property_double(zend_class_entry *scope, zval *object,
389389
ZEND_API void zend_update_property_str(zend_class_entry *scope, zval *object, const char *name, size_t name_length, zend_string *value);
390390
ZEND_API void zend_update_property_string(zend_class_entry *scope, zval *object, const char *name, size_t name_length, const char *value);
391391
ZEND_API void zend_update_property_stringl(zend_class_entry *scope, zval *object, const char *name, size_t name_length, const char *value, size_t value_length);
392-
ZEND_API void zend_unset_property(zend_class_entry *scope, zval *object, const char *name, size_t name_length);
392+
ZEND_API void zend_unset_property(zend_class_entry *scope, zend_object *object, const char *name, size_t name_length);
393393

394394
ZEND_API int zend_update_static_property_ex(zend_class_entry *scope, zend_string *name, zval *value);
395395
ZEND_API int zend_update_static_property(zend_class_entry *scope, const char *name, size_t name_length, zval *value);

Zend/zend_exceptions.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ ZEND_METHOD(Exception, __construct)
311311
#define CHECK_EXC_TYPE(id, type) \
312312
pvalue = zend_read_property_ex(i_get_exception_base(Z_OBJ_P(object)), Z_OBJ_P(object), ZSTR_KNOWN(id), 1, &value); \
313313
if (Z_TYPE_P(pvalue) != IS_NULL && Z_TYPE_P(pvalue) != type) { \
314-
zend_unset_property(i_get_exception_base(Z_OBJ_P(object)), object, ZSTR_VAL(ZSTR_KNOWN(id)), ZSTR_LEN(ZSTR_KNOWN(id))); \
314+
zend_unset_property(i_get_exception_base(Z_OBJ_P(object)), Z_OBJ_P(object), ZSTR_VAL(ZSTR_KNOWN(id)), ZSTR_LEN(ZSTR_KNOWN(id))); \
315315
}
316316

317317
ZEND_METHOD(Exception, __wakeup)

ext/soap/php_encoding.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,7 @@ static zval* get_zval_property(zval* object, char* name, zval *rv)
11851185
static void unset_zval_property(zval* object, char* name)
11861186
{
11871187
if (Z_TYPE_P(object) == IS_OBJECT) {
1188-
zend_unset_property(Z_OBJCE_P(object), object, name, strlen(name));
1188+
zend_unset_property(Z_OBJCE_P(object), Z_OBJ_P(object), name, strlen(name));
11891189
} else if (Z_TYPE_P(object) == IS_ARRAY) {
11901190
zend_hash_str_del(Z_ARRVAL_P(object), name, strlen(name));
11911191
}

0 commit comments

Comments
 (0)