Patch undef-dynamic-throw for Reflection related Bug #62694
Patch version 2018-09-05 14:21 UTC
Return to Bug #62694 |
Download this patch
Patch Revisions:
Developer: cmb@php.net
ext/reflection/php_reflection.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 8fe8da071a..24e50a968b 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -5462,6 +5462,11 @@ ZEND_METHOD(reflection_property, getValue)
/* Returns from this function */
}
+ name = _default_load_name(getThis());
+ if (!zend_hash_exists(Z_OBJ_HT_P(object)->get_properties(object), Z_STR_P(name))) {
+ _DO_THROW("Dynamic property does not exist in given instance");
+ }
+
member_p = zend_read_property_ex(ref->ce, object, ref->unmangled_name, 0, &rv);
if (member_p != &rv) {
ZVAL_COPY_DEREF(return_value, member_p);
|