com php-src: Switch code on thrown Errors to 0, update related tests: Zend/tests/methods-on-non-objects-catch.phpt
Zend/tests/methods-on-non-objects-usort.phpt Zend/zend.c
| From: | Aaron Piotrowski | Date: | Fri, 03 Jul 2015 22:53:42 +0000 |
| Subject: | com php-src: Switch code on thrown Errors to 0, update related tests: Zend/tests/methods-on-non-objects-catch.phpt Zend/tests/methods-on-non-objects-usort.phpt Zend/zend.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-87741@lists.php.net to get a copy of this message | ||
Commit: 1a0ddf988c92614de6890c12ee305c4bf1ff4302
Author: Aaron Piotrowski <aaron@trowski.com> Fri, 3 Jul 2015 17:28:11 -0500
Parents: fbcc82395269df8d4c862ad8eaede89beb1eb4bb
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1a0ddf988c92614de6890c12ee305c4bf1ff4302
Log:
Switch code on thrown Errors to 0, update related tests
Changed paths:
M Zend/tests/methods-on-non-objects-catch.phpt
M Zend/tests/methods-on-non-objects-usort.phpt
M Zend/zend.c
Diff:
diff --git a/Zend/tests/methods-on-non-objects-catch.phpt
b/Zend/tests/methods-on-non-objects-catch.phpt
index 2082433...083ae75 100644
--- a/Zend/tests/methods-on-non-objects-catch.phpt
+++ b/Zend/tests/methods-on-non-objects-catch.phpt
@@ -16,6 +16,6 @@ echo "Alive\n";
?>
--EXPECTF--
-int(1)
+int(0)
string(%d) "Call to a member function method() on null"
Alive
diff --git a/Zend/tests/methods-on-non-objects-usort.phpt
b/Zend/tests/methods-on-non-objects-usort.phpt
index d52a0fd..5547695 100644
--- a/Zend/tests/methods-on-non-objects-usort.phpt
+++ b/Zend/tests/methods-on-non-objects-usort.phpt
@@ -20,13 +20,13 @@ var_dump($list);
echo "Alive\n";
?>
--EXPECTF--
-int(1)
+int(0)
string(43) "Call to a member function compare() on null"
-int(1)
+int(0)
string(43) "Call to a member function compare() on null"
-int(1)
+int(0)
string(43) "Call to a member function compare() on null"
-int(1)
+int(0)
string(43) "Call to a member function compare() on null"
array(5) {
[0]=>
diff --git a/Zend/zend.c b/Zend/zend.c
index af2abd1..9e8613a 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -1302,7 +1302,7 @@ ZEND_API void zend_throw_error(zend_class_entry *exception_ce, const char
*forma
// TODO: we can't convert compile-time errors to exceptions yet???
if (EG(current_execute_data) && !CG(in_compilation)) {
- zend_throw_exception(exception_ce, message, E_ERROR);
+ zend_throw_exception(exception_ce, message, 0);
} else {
zend_error(E_ERROR, message);
}