mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
Improve error message
This commit is contained in:
parent
3b2f56275a
commit
09e76476ef
4 changed files with 33 additions and 29 deletions
28
main/main.c
28
main/main.c
|
@ -424,34 +424,6 @@ static int php_during_module_shutdown()
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ get_active_class_name */
|
||||
static char *get_active_class_name(char **space TSRMLS_DC)
|
||||
{
|
||||
if (!zend_is_executing(TSRMLS_C)) {
|
||||
if (space) {
|
||||
*space = "";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
switch (EG(function_state_ptr)->function->type) {
|
||||
case ZEND_USER_FUNCTION:
|
||||
case ZEND_INTERNAL_FUNCTION:
|
||||
{
|
||||
zend_class_entry *ce = EG(function_state_ptr)->function->common.scope;
|
||||
|
||||
if (space) {
|
||||
*space = ce ? "::" : "";
|
||||
}
|
||||
return ce ? ce->name : "";
|
||||
}
|
||||
default:
|
||||
if (space) {
|
||||
*space = "";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
/* }}} */
|
||||
|
||||
/* {{{ php_verror */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue