@@ -450,21 +450,23 @@ zend_bool pmmpthread_store_isset(zend_object *object, zval *key, int has_set_exi
450
450
} /* }}} */
451
451
452
452
static inline void pmmpthread_store_update_local_property (zend_object * object , zval * key , zend_property_info * prop_info , zval * value ) {
453
- Z_TRY_ADDREF_P (value );
454
-
455
453
zval * property ;
456
454
if (prop_info != NULL && prop_info != ZEND_WRONG_PROPERTY_INFO ) {
455
+ Z_TRY_ADDREF_P (value );
457
456
property = OBJ_PROP (object , prop_info -> offset );
458
457
zval_ptr_dtor (property );
459
458
ZVAL_COPY_VALUE (property , value );
460
459
} else {
461
460
pmmpthread_store_init_local_properties (object );
462
- if (Z_TYPE_P (key ) == IS_LONG ) {
463
- zend_hash_index_update (object -> properties , Z_LVAL_P (key ), value );
464
- } else {
465
- zend_string * str_key = Z_STR_P (key );
466
- property = zend_hash_find (object -> properties , str_key );
467
- if (property != value ) {
461
+ property = Z_TYPE_P (key ) == IS_LONG ?
462
+ zend_hash_index_find (object -> properties , Z_LVAL_P (key )) :
463
+ zend_hash_find (object -> properties , Z_STR_P (key ));
464
+ if (property != value ) {
465
+ Z_TRY_ADDREF_P (value );
466
+ if (Z_TYPE_P (key ) == IS_LONG ) {
467
+ zend_hash_index_update (object -> properties , Z_LVAL_P (key ), value );
468
+ } else {
469
+ zend_string * str_key = Z_STR_P (key );
468
470
//update_ind() ensures defined properties get properly updated even if we didn't have prop_info
469
471
if ((GC_FLAGS (str_key ) & (IS_STR_PERSISTENT | IS_STR_INTERNED )) == IS_STR_PERSISTENT ) {
470
472
//refcounted persistent string from pmmpthread_store - we can't use it directly
0 commit comments