diff options
author | Dmitry Stogov <dmitry@php.net> | 2008-05-05 09:44:39 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2008-05-05 09:44:39 +0000 |
commit | 5a0253c14cf197c42731c7a2aef37920d6009ee3 (patch) | |
tree | 71c5cbd1f57928a9dba4c83555a56f1ef019b9b2 /Zend/zend_API.c | |
parent | f61731874a5682ba49269a29b30a632486c540b4 (diff) | |
download | php-git-5a0253c14cf197c42731c7a2aef37920d6009ee3.tar.gz |
Support for old-style constructors in namespaces
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r-- | Zend/zend_API.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index bfa2dcf296..3676026d81 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -1792,7 +1792,13 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio if (scope) { class_name_len = strlen(scope->name); - lc_class_name = zend_str_tolower_dup(scope->name, class_name_len); + if ((lc_class_name = zend_memrchr(scope->name, ':', class_name_len))) { + lc_class_name++; + class_name_len -= (lc_class_name - scope->name); + lc_class_name = zend_str_tolower_dup(lc_class_name, class_name_len); + } else { + lc_class_name = zend_str_tolower_dup(scope->name, class_name_len); + } } while (ptr->fname) { |