mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Clarify type of use in error messages
This commit is contained in:
parent
e23ad4eeb2
commit
602fef0e52
4 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue