summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--Zend/tests/bug43344_3.phpt6
-rw-r--r--Zend/tests/bug43344_4.phpt6
-rw-r--r--Zend/tests/bug43344_5.phpt6
-rw-r--r--Zend/tests/class_constants_002.phpt6
-rw-r--r--Zend/zend_compile.c2
-rw-r--r--tests/classes/constants_error_004.phpt5
7 files changed, 27 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index 1f48fb5f17..906b6a67e8 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,8 @@ PHP NEWS
. Fixed bug #76846 (Segfault in shutdown function after memory limit error).
(Nikita)
. Fixed bug #76946 (Cyclic reference in generator not detected). (Nikita)
+ . Fixed bug #72635 (Undefined class used by class constant in constexpr
+ generates fatal error). (Nikita)
27 Sep 2018, PHP 7.3.0RC2
diff --git a/Zend/tests/bug43344_3.phpt b/Zend/tests/bug43344_3.phpt
index 579ed81ada..5450759bcc 100644
--- a/Zend/tests/bug43344_3.phpt
+++ b/Zend/tests/bug43344_3.phpt
@@ -9,4 +9,8 @@ function f($a=Foo::bar) {
echo f()."\n";
?>
--EXPECTF--
-Fatal error: Class 'Foo\Foo' not found in %sbug43344_3.php on line %d
+Fatal error: Uncaught Error: Class 'Foo\Foo' not found in %s:%d
+Stack trace:
+#0 %s(%d): Foo\f()
+#1 {main}
+ thrown in %s on line %d
diff --git a/Zend/tests/bug43344_4.phpt b/Zend/tests/bug43344_4.phpt
index 97e08b3664..c147766bf6 100644
--- a/Zend/tests/bug43344_4.phpt
+++ b/Zend/tests/bug43344_4.phpt
@@ -9,4 +9,8 @@ function f($a=array(Foo::bar)) {
echo f()."\n";
?>
--EXPECTF--
-Fatal error: Class 'Foo\Foo' not found in %sbug43344_4.php on line %d
+Fatal error: Uncaught Error: Class 'Foo\Foo' not found in %s:%d
+Stack trace:
+#0 %s(%d): Foo\f()
+#1 {main}
+ thrown in %s on line %d
diff --git a/Zend/tests/bug43344_5.phpt b/Zend/tests/bug43344_5.phpt
index 645ef33e7f..8cc333fd31 100644
--- a/Zend/tests/bug43344_5.phpt
+++ b/Zend/tests/bug43344_5.phpt
@@ -10,4 +10,8 @@ function f($a=array(Foo::bar=>0)) {
echo f()."\n";
?>
--EXPECTF--
-Fatal error: Class 'Foo\Foo' not found in %sbug43344_5.php on line %d
+Fatal error: Uncaught Error: Class 'Foo\Foo' not found in %s:%d
+Stack trace:
+#0 %s(%d): Foo\f()
+#1 {main}
+ thrown in %s on line %d
diff --git a/Zend/tests/class_constants_002.phpt b/Zend/tests/class_constants_002.phpt
index 9aad8088da..48d0fd8502 100644
--- a/Zend/tests/class_constants_002.phpt
+++ b/Zend/tests/class_constants_002.phpt
@@ -28,4 +28,8 @@ int(1)
int(5)
int(10)
-Fatal error: Class 'NoSuchClass' not found in %s on line %d
+Fatal error: Uncaught Error: Class 'NoSuchClass' not found in %s:%d
+Stack trace:
+#0 %s(%d): bar()
+#1 {main}
+ thrown in %s on line %d
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 8a5d15bfa3..f018d10152 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -8033,7 +8033,7 @@ void zend_compile_const_expr_class_const(zend_ast **ast_ptr) /* {{{ */
zend_ast_destroy(ast);
zend_string_release_ex(class_name, 0);
- *ast_ptr = zend_ast_create_constant(name, fetch_type);
+ *ast_ptr = zend_ast_create_constant(name, fetch_type | ZEND_FETCH_CLASS_EXCEPTION);
}
/* }}} */
diff --git a/tests/classes/constants_error_004.phpt b/tests/classes/constants_error_004.phpt
index 3f34473dad..27777f8772 100644
--- a/tests/classes/constants_error_004.phpt
+++ b/tests/classes/constants_error_004.phpt
@@ -10,4 +10,7 @@ Class constant whose initial value references a non-existent class
$a = new C();
?>
--EXPECTF--
-Fatal error: Class 'D' not found in %s on line %d
+Fatal error: Uncaught Error: Class 'D' not found in %s:%d
+Stack trace:
+#0 {main}
+ thrown in %s on line %d