summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-08-13 20:24:39 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-08-13 20:24:39 +0200
commitd0f4ec4c31c873d64728a8fb6b9e7939948461c6 (patch)
tree7ab59eaf285f460174ceb4e2d0a028032bba6198 /ext/reflection/php_reflection.c
parent8c927442b45da4934e1b6afe28ab43abd4a5f796 (diff)
parentd891b5f458a253befaa56d325ae90518536fc2f0 (diff)
downloadphp-git-d0f4ec4c31c873d64728a8fb6b9e7939948461c6.tar.gz
Merge branch 'PHP-7.4'
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index d6977a8a34..5f7dd80435 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -4583,7 +4583,7 @@ ZEND_METHOD(reflection_class, isInstance)
}
/* }}} */
-/* {{{ proto public stdclass ReflectionClass::newInstance([mixed* args], ...)
+/* {{{ proto public object ReflectionClass::newInstance([mixed* args], ...)
Returns an instance of this class */
ZEND_METHOD(reflection_class, newInstance)
{
@@ -4657,7 +4657,7 @@ ZEND_METHOD(reflection_class, newInstance)
}
/* }}} */
-/* {{{ proto public stdclass ReflectionClass::newInstanceWithoutConstructor()
+/* {{{ proto public object ReflectionClass::newInstanceWithoutConstructor()
Returns an instance of this class without invoking its constructor */
ZEND_METHOD(reflection_class, newInstanceWithoutConstructor)
{
@@ -4666,7 +4666,8 @@ ZEND_METHOD(reflection_class, newInstanceWithoutConstructor)
GET_REFLECTION_OBJECT_PTR(ce);
- if (ce->create_object != NULL && ce->ce_flags & ZEND_ACC_FINAL) {
+ if (ce->type == ZEND_INTERNAL_CLASS
+ && ce->create_object != NULL && (ce->ce_flags & ZEND_ACC_FINAL)) {
zend_throw_exception_ex(reflection_exception_ptr, 0, "Class %s is an internal class marked as final that cannot be instantiated without invoking its constructor", ZSTR_VAL(ce->name));
return;
}
@@ -4675,7 +4676,7 @@ ZEND_METHOD(reflection_class, newInstanceWithoutConstructor)
}
/* }}} */
-/* {{{ proto public stdclass ReflectionClass::newInstanceArgs([array args])
+/* {{{ proto public object ReflectionClass::newInstanceArgs([array args])
Returns an instance of this class */
ZEND_METHOD(reflection_class, newInstanceArgs)
{