php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #60536
Patch property008.phpt revision 2011-12-16 16:46 UTC by gron@php.net
Patch property007.phpt revision 2011-12-16 16:19 UTC by gron@php.net
Patch property006.phpt revision 2011-12-16 16:19 UTC by gron@php.net
Patch property005.phpt revision 2011-12-16 16:19 UTC by gron@php.net
Patch bug60536.phpt revision 2011-12-16 15:57 UTC by laruence@php.net
Patch bug60536.patch revision 2011-12-16 15:54 UTC by laruence@php.net

Patch bug60536.patch for Scripting Engine problem Bug #60536

Patch version 2011-12-16 15:54 UTC

Return to Bug #60536 | Download this patch
Patch Revisions:

Developer: laruence@php.net

Index: Zend/zend_compile.c
===================================================================
--- Zend/zend_compile.c	(revision 321059)
+++ Zend/zend_compile.c	(working copy)
@@ -4306,19 +4306,19 @@
 								prop_name,
 								ce->name);
 				}
-			}
+			} else {
+				/* property not found, so lets add it */
+				if (property_info->flags & ZEND_ACC_STATIC) {
+					prop_value = ce->traits[i]->default_static_members_table[property_info->offset];
+				} else {
+					prop_value = ce->traits[i]->default_properties_table[property_info->offset];
+				}
+				Z_ADDREF_P(prop_value);
 
-			/* property not found, so lets add it */
-			if (property_info->flags & ZEND_ACC_STATIC) {
-				prop_value = ce->traits[i]->default_static_members_table[property_info->offset];
-			} else {
-				prop_value = ce->traits[i]->default_properties_table[property_info->offset];
+				zend_declare_property_ex(ce, prop_name, prop_name_length, 
+						prop_value, property_info->flags, 
+						property_info->doc_comment, property_info->doc_comment_len TSRMLS_CC);
 			}
-			Z_ADDREF_P(prop_value);
-
-			zend_declare_property_ex(ce, prop_name, prop_name_length, 
-									 prop_value, property_info->flags, 
-								     property_info->doc_comment, property_info->doc_comment_len TSRMLS_CC);
 		}
 	}
 }
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 12:01:29 2024 UTC