diff options
author | Stanislav Malyshev <stas@php.net> | 2003-02-16 11:15:30 +0000 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2003-02-16 11:15:30 +0000 |
commit | e77eca7568715ed74f9490cfec1dfcad0960fe08 (patch) | |
tree | 1806f36ec0a68bde4e1b6abe4b95e836cc84c629 | |
parent | a4c3b2ce807dec309812cfe72c91a597c8476113 (diff) | |
download | php-git-e77eca7568715ed74f9490cfec1dfcad0960fe08.tar.gz |
namespace patch - static variable access
-rw-r--r-- | Zend/zend_object_handlers.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 4e3ed31f64..071d246d85 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -631,6 +631,9 @@ zval **zend_get_static_property(zend_class_entry *ce, char *property_name, int p zend_property_info *property_info; zend_property_info std_property_info; + if(ce->type == ZEND_NAMESPACE) { + zend_hash_find(ce->static_members, property_name, property_name_len+1, (void **) &retval); + } else { if (zend_hash_find(&ce->properties_info, property_name, property_name_len+1, (void **) &property_info)==FAILURE) { std_property_info.flags = ZEND_ACC_PUBLIC; std_property_info.name = property_name; @@ -654,6 +657,7 @@ zval **zend_get_static_property(zend_class_entry *ce, char *property_name, int p } tmp_ce = tmp_ce->parent; } + } if (!retval) { switch (type) { @@ -669,9 +673,11 @@ zval **zend_get_static_property(zend_class_entry *ce, char *property_name, int p case BP_VAR_W: { zval *new_zval = &EG(uninitialized_zval); + if(ce->type != ZEND_NAMESPACE) { new_zval->refcount++; zend_hash_quick_update(ce->static_members, property_info->name, property_info->name_length+1, property_info->h, &new_zval, sizeof(zval *), (void **) &retval); } + } break; EMPTY_SWITCH_DEFAULT_CASE() } |