diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-03-20 17:26:12 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-03-20 17:26:12 +0300 |
commit | 7cf05ce8dadd84db9f39d68ae97dbed5ca769fbb (patch) | |
tree | 909f32b19c9034725fe95bce5be76f07e86c1b23 | |
parent | 59356126664584e0a67128acad161f8bd86381fa (diff) | |
download | php-git-7cf05ce8dadd84db9f39d68ae97dbed5ca769fbb.tar.gz |
Fixed error messages
-rw-r--r-- | Zend/zend_exceptions.c | 2 | ||||
-rw-r--r-- | tests/lang/catchable_error_002.phpt | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 46ad207087..b88c13e6d0 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 04e19897f4..bc585f7b10 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! |