From: Dmitry Stogov Date: Tue, 2 Sep 2008 09:45:36 +0000 (+0000) Subject: Fixed Bug #43958 (class name added into the error message) X-Git-Tag: php-5.2.7RC1~72 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bc053b7628c96d7eaec06aea1f916f7505e9efc1;p=php Fixed Bug #43958 (class name added into the error message) --- diff --git a/NEWS b/NEWS index 332e508f27..63ddd66706 100644 --- a/NEWS +++ b/NEWS @@ -87,6 +87,7 @@ PHP NEWS (Jani) - Fixed bug #43993 (mb_substr_count() behaves differently to substr_count() with overlapping needles). (Moriyoshi) +- Fixed Bug #43958 (class name added into the error message). (Dmitry) - Fixed bug #43941 (json_encode silently cuts non-UTF8 strings). (Stas) - Fixed bug #43782 (feof() does not detect timeout on socket). (David Soria Parra) - Fixed bug #43668 (Added odbc.default_cursortype to control the ODBC diff --git a/main/main.c b/main/main.c index 533207f188..98f0a4902a 100644 --- a/main/main.c +++ b/main/main.c @@ -568,8 +568,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; - char *class_name = get_active_class_name(&space TSRMLS_CC); + char *space = ""; + char *class_name = ""; char *function; int origin_len; char *origin; @@ -625,6 +625,7 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c function = "Unknown"; } else { is_function = 1; + 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-- +