]> granicus.if.org Git - php/commitdiff
Switch code on thrown Errors to 0, update related tests
authorAaron Piotrowski <aaron@trowski.com>
Fri, 3 Jul 2015 22:28:11 +0000 (17:28 -0500)
committerAaron Piotrowski <aaron@trowski.com>
Fri, 3 Jul 2015 22:53:42 +0000 (17:53 -0500)
Zend/tests/methods-on-non-objects-catch.phpt
Zend/tests/methods-on-non-objects-usort.phpt
Zend/zend.c

index 208243318134555f489ba185a7ac9d49e541ac55..083ae75e499f5e359a3e3b81c46280ecad0fedb1 100644 (file)
@@ -16,6 +16,6 @@ echo "Alive\n";
 ?>
 --EXPECTF--
 
-int(1)
+int(0)
 string(%d) "Call to a member function method() on null"
 Alive
index d52a0fddb5a4a9ef0ce3d8b4cc6dbe21e5f67f45..5547695f72bbf03b5e3b1c12f2f96c54321f8485 100644 (file)
@@ -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]=>
index af2abd13c6fcfc84d4a663926e52580dbc3351e2..9e8613aa557100fadf79f48226f9182c46fcd663 100644 (file)
@@ -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);
        }