summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authortwosee <twose@qq.com>2020-06-06 14:47:39 +0800
committerGeorge Peter Banyard <girgias@php.net>2020-06-06 17:17:44 +0200
commitcb2275866dbc2a3aedfa7f216c6cb38653d67af6 (patch)
tree54c5dd98f856d914c679633f00c14e664f281d69 /tests
parentaa9b0ccda88531f9bb3f2149db002c5fcaaa7b14 (diff)
downloadphp-git-cb2275866dbc2a3aedfa7f216c6cb38653d67af6.tar.gz
Fix BC break of zend_throw_exception
This also fixes a SegFault Closes GH-5670
Diffstat (limited to 'tests')
-rw-r--r--tests/lang/zend_throw_exception_001.phpt14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/lang/zend_throw_exception_001.phpt b/tests/lang/zend_throw_exception_001.phpt
new file mode 100644
index 0000000000..c8d3603e72
--- /dev/null
+++ b/tests/lang/zend_throw_exception_001.phpt
@@ -0,0 +1,14 @@
+--TEST--
+zend_throw_exception with NULL message
+--FILE--
+<?php
+assert_options(ASSERT_EXCEPTION, true);
+try {
+ $assert = 'assert';
+ $assert(false);
+} catch (AssertionError $assertionError) {
+ echo 'Done' . PHP_EOL;
+}
+?>
+--EXPECT--
+Done