Skip to content

Commit fb83c76

Browse files
committed
Check that the type is correct
1 parent 95b9c34 commit fb83c76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/incomplete_class.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ PHPAPI char *php_lookup_class_name(zval *object, zend_uint *nlen)
144144

145145
object_properties = Z_OBJPROP_P(object);
146146

147-
if (zend_hash_find(object_properties, MAGIC_MEMBER, sizeof(MAGIC_MEMBER), (void **) &val) == SUCCESS) {
147+
if (zend_hash_find(object_properties, MAGIC_MEMBER, sizeof(MAGIC_MEMBER), (void **) &val) == SUCCESS && Z_TYPE_PP(val) == IS_STRING) {
148148
retval = estrndup(Z_STRVAL_PP(val), Z_STRLEN_PP(val));
149149

150150
if (nlen) {

0 commit comments

Comments
 (0)