From: Dmitry Stogov Date: Tue, 2 Sep 2008 09:46:00 +0000 (+0000) Subject: Fixed Bug #43958 (class name added into the error message) X-Git-Tag: BEFORE_HEAD_NS_CHANGE~492 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e8894b43e6c250d007d12524a0e9d16892cd8b3c;p=php Fixed Bug #43958 (class name added into the error message) --- diff --git a/main/main.c b/main/main.c index e9fd48554e..0dc67777e5 100644 --- a/main/main.c +++ b/main/main.c @@ -668,8 +668,8 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c char *docref_target = "", *docref_root = ""; char *p; int buffer_len = 0; - char *space; - zstr class_name = get_active_class_name(&space TSRMLS_CC); + char *space = ""; + zstr class_name = EMPTY_ZSTR; int origin_len; zstr function = NULL_ZSTR; char *origin; @@ -721,6 +721,8 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c if (!function.v || !USTR_LEN(function)) { stage = "Unknown"; function.v = NULL; + } else { + class_name = get_active_class_name(&space TSRMLS_CC); } } diff --git a/tests/lang/bug43958.phpt b/tests/lang/bug43958.phpt new file mode 100644 index 0000000000..bc88bcda0f --- /dev/null +++ b/tests/lang/bug43958.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug #43958 (class name added into the error message) +--FILE-- +