@@ -639,6 +639,7 @@ static void php_var_serialize_class(smart_str *buf, zval *struc, zval *retval_pt
639
639
HashPosition pos ;
640
640
int i ;
641
641
zval nval , * nvalp ;
642
+ HashTable * propers ;
642
643
643
644
ZVAL_NULL (& nval );
644
645
nvalp = & nval ;
@@ -664,7 +665,8 @@ static void php_var_serialize_class(smart_str *buf, zval *struc, zval *retval_pt
664
665
smart_str_appendl (buf ,"N;" , 2 );
665
666
continue ;
666
667
}
667
- if (zend_hash_find (Z_OBJPROP_P (struc ), Z_STRVAL_PP (name ), Z_STRLEN_PP (name ) + 1 , (void * ) & d ) == SUCCESS ) {
668
+ propers = Z_OBJPROP_P (struc );
669
+ if (zend_hash_find (propers , Z_STRVAL_PP (name ), Z_STRLEN_PP (name ) + 1 , (void * ) & d ) == SUCCESS ) {
668
670
php_var_serialize_string (buf , Z_STRVAL_PP (name ), Z_STRLEN_PP (name ));
669
671
php_var_serialize_intern (buf , * d , var_hash TSRMLS_CC );
670
672
} else {
@@ -676,15 +678,15 @@ static void php_var_serialize_class(smart_str *buf, zval *struc, zval *retval_pt
676
678
677
679
do {
678
680
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 );
679
- if (zend_hash_find (Z_OBJPROP_P ( struc ) , priv_name , prop_name_length + 1 , (void * ) & d ) == SUCCESS ) {
681
+ if (zend_hash_find (propers , priv_name , prop_name_length + 1 , (void * ) & d ) == SUCCESS ) {
680
682
php_var_serialize_string (buf , priv_name , prop_name_length );
681
683
pefree (priv_name , ce -> type & ZEND_INTERNAL_CLASS );
682
684
php_var_serialize_intern (buf , * d , var_hash TSRMLS_CC );
683
685
break ;
684
686
}
685
687
pefree (priv_name , ce -> type & ZEND_INTERNAL_CLASS );
686
688
zend_mangle_property_name (& prot_name , & prop_name_length , "*" , 1 , Z_STRVAL_PP (name ), Z_STRLEN_PP (name ), ce -> type & ZEND_INTERNAL_CLASS );
687
- if (zend_hash_find (Z_OBJPROP_P ( struc ) , prot_name , prop_name_length + 1 , (void * ) & d ) == SUCCESS ) {
689
+ if (zend_hash_find (propers , prot_name , prop_name_length + 1 , (void * ) & d ) == SUCCESS ) {
688
690
php_var_serialize_string (buf , prot_name , prop_name_length );
689
691
pefree (prot_name , ce -> type & ZEND_INTERNAL_CLASS );
690
692
php_var_serialize_intern (buf , * d , var_hash TSRMLS_CC );
0 commit comments