@@ -626,6 +626,7 @@ static void php_var_serialize_class(smart_str *buf, zval *struc, zval *retval_pt
626
626
HashPosition pos ;
627
627
int i ;
628
628
zval nval , * nvalp ;
629
+ HashTable * propers ;
629
630
630
631
ZVAL_NULL (& nval );
631
632
nvalp = & nval ;
@@ -651,7 +652,8 @@ static void php_var_serialize_class(smart_str *buf, zval *struc, zval *retval_pt
651
652
smart_str_appendl (buf ,"N;" , 2 );
652
653
continue ;
653
654
}
654
- if (zend_hash_find (Z_OBJPROP_P (struc ), Z_STRVAL_PP (name ), Z_STRLEN_PP (name ) + 1 , (void * ) & d ) == SUCCESS ) {
655
+ propers = Z_OBJPROP_P (struc );
656
+ if (zend_hash_find (propers , Z_STRVAL_PP (name ), Z_STRLEN_PP (name ) + 1 , (void * ) & d ) == SUCCESS ) {
655
657
php_var_serialize_string (buf , Z_STRVAL_PP (name ), Z_STRLEN_PP (name ));
656
658
php_var_serialize_intern (buf , * d , var_hash TSRMLS_CC );
657
659
} else {
@@ -663,15 +665,15 @@ static void php_var_serialize_class(smart_str *buf, zval *struc, zval *retval_pt
663
665
664
666
do {
665
667
zend_mangle_property_name (& priv_name , & prop_name_length , ce -> name , ce -> name_length , Z_STRVAL_PP (name ), Z_STRLEN_PP (name ), ce -> type & ZEND_INTERNAL_CLASS );
666
- if (zend_hash_find (Z_OBJPROP_P ( struc ) , priv_name , prop_name_length + 1 , (void * ) & d ) == SUCCESS ) {
668
+ if (zend_hash_find (propers , priv_name , prop_name_length + 1 , (void * ) & d ) == SUCCESS ) {
667
669
php_var_serialize_string (buf , priv_name , prop_name_length );
668
670
pefree (priv_name , ce -> type & ZEND_INTERNAL_CLASS );
669
671
php_var_serialize_intern (buf , * d , var_hash TSRMLS_CC );
670
672
break ;
671
673
}
672
674
pefree (priv_name , ce -> type & ZEND_INTERNAL_CLASS );
673
675
zend_mangle_property_name (& prot_name , & prop_name_length , "*" , 1 , Z_STRVAL_PP (name ), Z_STRLEN_PP (name ), ce -> type & ZEND_INTERNAL_CLASS );
674
- if (zend_hash_find (Z_OBJPROP_P ( struc ) , prot_name , prop_name_length + 1 , (void * ) & d ) == SUCCESS ) {
676
+ if (zend_hash_find (propers , prot_name , prop_name_length + 1 , (void * ) & d ) == SUCCESS ) {
675
677
php_var_serialize_string (buf , prot_name , prop_name_length );
676
678
pefree (prot_name , ce -> type & ZEND_INTERNAL_CLASS );
677
679
php_var_serialize_intern (buf , * d , var_hash TSRMLS_CC );
0 commit comments