diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2014-02-21 18:55:04 +0400 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2014-02-21 18:55:04 +0400 |
| commit | 686ea7f20e376de71d361c3b81164cf6840ba69b (patch) | |
| tree | 612f0a433ae1e8782ce4e063994506738ace2b9c | |
| parent | 25490102783a0aadc1700b549f4d57380df3da22 (diff) | |
| download | php-git-686ea7f20e376de71d361c3b81164cf6840ba69b.tar.gz | |
Fixed compound name resolution
| -rw-r--r-- | Zend/zend_compile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 72d495dd1a..c8c7b90adb 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -7144,7 +7144,7 @@ void zend_do_use(znode *ns_name, znode *new_name, int is_global TSRMLS_DC) /* {{ zend_str_tolower_copy(c_ns_name->val, Z_STRVAL(CG(current_namespace)), Z_STRLEN(CG(current_namespace))); c_ns_name->val[Z_STRLEN(CG(current_namespace))] = '\\'; - memcpy(c_ns_name->val+Z_STRLEN(CG(current_namespace))+1, lcname, Z_STRLEN_P(name)+1); + memcpy(c_ns_name->val+Z_STRLEN(CG(current_namespace))+1, lcname->val, Z_STRLEN_P(name)+1); if (zend_hash_exists(CG(class_table), c_ns_name)) { char *tmp2 = zend_str_tolower_dup(Z_STRVAL(ns), Z_STRLEN(ns)); @@ -7176,7 +7176,7 @@ void zend_do_use(znode *ns_name, znode *new_name, int is_global TSRMLS_DC) /* {{ } zend_error(E_WARNING, "The use statement with non-compound name '%s' has no effect", Z_STRVAL_P(name)); } - efree(lcname); + STR_RELEASE(lcname); zval_dtor(name); } /* }}} */ |
