Skip to content

Commit 35f2e88

Browse files
Simplify ReflectionProperty::getSettableType() property handling
Once the `property_reference` has been dereferenced to identify the `zend_property_info`, no need to do so again since the result was already stored in a variable.
1 parent fc6aaf7 commit 35f2e88

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ext/reflection/php_reflection.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6426,7 +6426,7 @@ ZEND_METHOD(ReflectionProperty, getSettableType)
64266426

64276427
const zend_property_info *prop = ref->prop;
64286428
/* Dynamic property is untyped. */
6429-
if (!ref->prop) {
6429+
if (!prop) {
64306430
RETURN_NULL();
64316431
}
64326432

@@ -6448,10 +6448,10 @@ ZEND_METHOD(ReflectionProperty, getSettableType)
64486448
}
64496449

64506450
/* Fall back to property type */
6451-
if (!ZEND_TYPE_IS_SET(ref->prop->type)) {
6451+
if (!ZEND_TYPE_IS_SET(prop->type)) {
64526452
RETURN_NULL();
64536453
}
6454-
reflection_type_factory(ref->prop->type, return_value, true);
6454+
reflection_type_factory(prop->type, return_value, true);
64556455
}
64566456

64576457
/* {{{ Returns whether property has a type */

0 commit comments

Comments
 (0)