diff options
author | Igor Wiedler <igor@wiedler.ch> | 2013-10-14 23:32:11 +0200 |
---|---|---|
committer | Igor Wiedler <igor@wiedler.ch> | 2013-10-14 23:32:11 +0200 |
commit | 602fef0e52caacf754eacfb96e9342ce32d29a37 (patch) | |
tree | ac57d0768fdb9056ade7875781238d0ada6912bd | |
parent | e23ad4eeb2249c18f11eee751611395cb845c010 (diff) | |
download | php-git-602fef0e52caacf754eacfb96e9342ce32d29a37.tar.gz |
Clarify type of use in error messages
-rw-r--r-- | Zend/tests/use_const/conflicting_use.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/use_function/case_insensivity.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/use_function/conflicting_use.phpt | 2 | ||||
-rw-r--r-- | Zend/zend_compile.c | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/Zend/tests/use_const/conflicting_use.phpt b/Zend/tests/use_const/conflicting_use.phpt index f873fdcc65..3b3c4b3262 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 53ae3658a9..ba6e3a7e4b 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 ed531e4feb..0221fbdebb 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 b811554812..9c238ac67c 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); |