Commit: 602fef0e52caacf754eacfb96e9342ce32d29a37 Author: Igor Wiedler <i...@wiedler.ch> Mon, 14 Oct 2013 23:32:11 +0200 Parents: e23ad4eeb2249c18f11eee751611395cb845c010 Branches: PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=602fef0e52caacf754eacfb96e9342ce32d29a37 Log: Clarify type of use in error messages Changed paths: M Zend/tests/use_const/conflicting_use.phpt M Zend/tests/use_function/case_insensivity.phpt M Zend/tests/use_function/conflicting_use.phpt M Zend/zend_compile.c Diff: diff --git a/Zend/tests/use_const/conflicting_use.phpt b/Zend/tests/use_const/conflicting_use.phpt index f873fdc..3b3c4b3 100644 --- a/Zend/tests/use_const/conflicting_use.phpt +++ b/Zend/tests/use_const/conflicting_use.phpt @@ -18,4 +18,4 @@ namespace { ?> --EXPECTF-- -Fatal error: Cannot use bar\baz as baz because the name is already in use in %s on line %d +Fatal error: Cannot use const bar\baz as baz because the name is already in use in %s on line %d diff --git a/Zend/tests/use_function/case_insensivity.phpt b/Zend/tests/use_function/case_insensivity.phpt index 53ae365..ba6e3a7 100644 --- a/Zend/tests/use_function/case_insensivity.phpt +++ b/Zend/tests/use_function/case_insensivity.phpt @@ -10,4 +10,4 @@ namespace { ?> --EXPECTF-- -Fatal error: Cannot use foo\BAR as BAR because the name is already in use in %s on line %d +Fatal error: Cannot use function foo\BAR as BAR because the name is already in use in %s on line %d diff --git a/Zend/tests/use_function/conflicting_use.phpt b/Zend/tests/use_function/conflicting_use.phpt index ed531e4..0221fbd 100644 --- a/Zend/tests/use_function/conflicting_use.phpt +++ b/Zend/tests/use_function/conflicting_use.phpt @@ -22,4 +22,4 @@ namespace { ?> --EXPECTF-- -Fatal error: Cannot use bar\baz as baz because the name is already in use in %s on line %d +Fatal error: Cannot use function bar\baz as baz because the name is already in use in %s on line %d diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index b811554..9c238ac 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -7220,10 +7220,10 @@ void zend_do_use_non_class(znode *ns_name, znode *new_name, int is_global, const } if (zend_hash_add(current_import_sub, lookup_name, Z_STRLEN_P(name)+1, &ns, sizeof(zval*), NULL) != SUCCESS) { - zend_error(E_COMPILE_ERROR, "Cannot use %s as %s because the name is already in use", Z_STRVAL_P(ns), Z_STRVAL_P(name)); + zend_error(E_COMPILE_ERROR, "Cannot use %s %s as %s because the name is already in use", type, Z_STRVAL_P(ns), Z_STRVAL_P(name)); } if (warn) { - zend_error(E_WARNING, "The use statement with non-compound name '%s' has no effect", Z_STRVAL_P(name)); + zend_error(E_WARNING, "The use %s statement with non-compound name '%s' has no effect", type, Z_STRVAL_P(name)); } efree(lookup_name); zval_dtor(name); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php