summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-10-10 12:45:38 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-10-10 12:45:38 +0200
commitfea482ee5c3bd173d8f5c3523653f79f52d8c189 (patch)
tree092f6adab0a24e7c289a86112069575e8451d90b /Zend
parentf1aff654be2110d716f3304ed0a776309a84166d (diff)
parent12f4e9e020c3968c5a201ef96c4ee589ad36e5e5 (diff)
downloadphp-git-fea482ee5c3bd173d8f5c3523653f79f52d8c189.tar.gz
Merge branch 'PHP-7.4'
Diffstat (limited to 'Zend')
-rw-r--r--Zend/tests/type_declarations/typed_properties_021.phpt13
-rw-r--r--Zend/zend_API.c1
2 files changed, 8 insertions, 6 deletions
diff --git a/Zend/tests/type_declarations/typed_properties_021.phpt b/Zend/tests/type_declarations/typed_properties_021.phpt
index a9f82528d9..93a07771fb 100644
--- a/Zend/tests/type_declarations/typed_properties_021.phpt
+++ b/Zend/tests/type_declarations/typed_properties_021.phpt
@@ -6,10 +6,11 @@ class Foo {
public int $bar = BAR::BAZ;
}
-$foo = new Foo();
+try {
+ $foo = new Foo();
+} catch (Error $e) {
+ echo $e->getMessage(), "\n";
+}
?>
---EXPECTF--
-Fatal error: Uncaught Error: Class 'BAR' not found in %s:%d
-Stack trace:
-#0 {main}
- thrown in %s on line %d
+--EXPECT--
+Class 'BAR' not found
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index e9752c6d08..b32c82a1b9 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -1084,6 +1084,7 @@ ZEND_API int zend_update_class_constants(zend_class_entry *class_type) /* {{{ */
ZVAL_COPY(&tmp, val);
if (UNEXPECTED(zval_update_constant_ex(&tmp, ce) != SUCCESS)) {
+ zval_ptr_dtor(&tmp);
return FAILURE;
}
/* property initializers must always be evaluated with strict types */;