mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fixed error messages
This commit is contained in:
parent
bc3fb147cf
commit
2711e368b8
1 changed files with 4 additions and 4 deletions
|
@ -1308,9 +1308,9 @@ ZEND_API union _zend_function *zend_std_get_constructor(zval *object TSRMLS_DC)
|
|||
*/
|
||||
if (UNEXPECTED(constructor->common.scope != EG(scope))) {
|
||||
if (EG(scope)) {
|
||||
zend_error_noreturn(E_ERROR, "Call to private %s::%s() from context '%s'", constructor->common.scope->name, constructor->common.function_name, EG(scope)->name);
|
||||
zend_error_noreturn(E_ERROR, "Call to private %s::%s() from context '%s'", constructor->common.scope->name->val, constructor->common.function_name->val, EG(scope)->name->val);
|
||||
} else {
|
||||
zend_error_noreturn(E_ERROR, "Call to private %s::%s() from invalid context", constructor->common.scope->name, constructor->common.function_name);
|
||||
zend_error_noreturn(E_ERROR, "Call to private %s::%s() from invalid context", constructor->common.scope->name->val, constructor->common.function_name->val);
|
||||
}
|
||||
}
|
||||
} else if ((constructor->common.fn_flags & ZEND_ACC_PROTECTED)) {
|
||||
|
@ -1320,9 +1320,9 @@ ZEND_API union _zend_function *zend_std_get_constructor(zval *object TSRMLS_DC)
|
|||
*/
|
||||
if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(constructor), EG(scope)))) {
|
||||
if (EG(scope)) {
|
||||
zend_error_noreturn(E_ERROR, "Call to protected %s::%s() from context '%s'", constructor->common.scope->name, constructor->common.function_name, EG(scope)->name);
|
||||
zend_error_noreturn(E_ERROR, "Call to protected %s::%s() from context '%s'", constructor->common.scope->name->val, constructor->common.function_name->val, EG(scope)->name->val);
|
||||
} else {
|
||||
zend_error_noreturn(E_ERROR, "Call to protected %s::%s() from invalid context", constructor->common.scope->name, constructor->common.function_name);
|
||||
zend_error_noreturn(E_ERROR, "Call to protected %s::%s() from invalid context", constructor->common.scope->name->val, constructor->common.function_name->val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue