Commit: 98e4ecb6f042feb308d27130b9b48ab90729f049 Author: Michael Wallner <m...@php.net> Thu, 19 Sep 2013 10:51:57 +0200 Parents: 612e77e5c9aabe6c3dc991732f3ccd9d80b6efbb Branches: PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=98e4ecb6f042feb308d27130b9b48ab90729f049 Log: fix Zend/tests/ns_040.phpt failing It was wrongly assumed the namespace has to be looked up in a case sensitive manner too. Fixed the lookup to use a lower case represenation of the import name. Changed paths: M Zend/zend_compile.c Diff: diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 15dce18..b811554 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -2140,11 +2140,8 @@ void zend_resolve_non_class_name(znode *element_name, zend_bool *check_namespace if (compound && CG(current_import)) { len = compound - Z_STRVAL(element_name->u.constant); - if (case_sensitive) { - lookup_name = estrndup(Z_STRVAL(element_name->u.constant), len); - } else { - lookup_name = zend_str_tolower_dup(Z_STRVAL(element_name->u.constant), len); - } + /* namespace is always lowercase */ + lookup_name = zend_str_tolower_dup(Z_STRVAL(element_name->u.constant), len); /* Check if first part of compound name is an import name */ if (zend_hash_find(CG(current_import), lookup_name, len+1, (void**)&ns) == SUCCESS) { /* Substitute import name */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php