com php-src: Fixed error messages: Zend/zend_exceptions.c tests/lang/catchable_error_002.phpt

From: Date: Fri, 20 Mar 2015 14:26:12 +0000
Subject: com php-src: Fixed error messages: Zend/zend_exceptions.c tests/lang/catchable_error_002.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-85678@lists.php.net to get a copy of this message
Commit: 7cf05ce8dadd84db9f39d68ae97dbed5ca769fbb Author: Dmitry Stogov <dmitry@zend.com> Fri, 20 Mar 2015 17:26:12 +0300 Parents: 59356126664584e0a67128acad161f8bd86381fa Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7cf05ce8dadd84db9f39d68ae97dbed5ca769fbb Log: Fixed error messages Changed paths: M Zend/zend_exceptions.c M tests/lang/catchable_error_002.phpt Diff: diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions..c index 46ad207..b88c13e 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -909,7 +909,7 @@ ZEND_API void zend_exception_error(zend_object *ex, int severity) /* {{{ */ zend_long line = zval_get_long(GET_PROPERTY_SILENT(&exception, "line")); zend_long code = zval_get_long(GET_PROPERTY_SILENT(&exception, "code")); - if (ce_exception == type_exception_ce) { + if (ce_exception == type_exception_ce && strstr(message->val, ", called in ")) { zend_error_helper(code, file->val, line, "%s and defined", message->val); } else { zend_error_helper(code, file->val, line, "%s", message->val); diff --git a/tests/lang/catchable_error_002.phpt b/tests/lang/catchable_error_002.phpt index 04e1989..bc585f7 100644 --- a/tests/lang/catchable_error_002.phpt +++ b/tests/lang/catchable_error_002..phpt @@ -25,5 +25,5 @@ Catchable fatal error [2] echo "ALIVE!\n"; ?> --EXPECTF-- -Argument 1 passed to blah() must be an instance of Foo, instance of stdClass given, called in %scatchable_error_002.php on line %d and defined in %scatchable_error_002.php on line %d +Argument 1 passed to blah() must be an instance of Foo, instance of stdClass given, called in %scatchable_error_002.php on line %d ALIVE!

« previous php.cvs (#85678) next »