diff options
Diffstat (limited to 'ext/standard/type.c')
-rw-r--r-- | ext/standard/type.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/standard/type.c b/ext/standard/type.c index 8251a3f155..b4d8586dcc 100644 --- a/ext/standard/type.c +++ b/ext/standard/type.c @@ -225,8 +225,8 @@ static inline void php_is_type(INTERNAL_FUNCTION_PARAMETERS, int type) if (Z_TYPE_P(arg) == type) { if (type == IS_OBJECT) { zend_class_entry *ce = Z_OBJCE_P(arg); - if (ce->name->len == sizeof(INCOMPLETE_CLASS) - 1 - && !memcmp(ce->name->val, INCOMPLETE_CLASS, sizeof(INCOMPLETE_CLASS) - 1)) { + if (ZSTR_LEN(ce->name) == sizeof(INCOMPLETE_CLASS) - 1 + && !memcmp(ZSTR_VAL(ce->name), INCOMPLETE_CLASS, sizeof(INCOMPLETE_CLASS) - 1)) { RETURN_FALSE; } } else if (type == IS_RESOURCE) { @@ -413,8 +413,8 @@ PHP_FUNCTION(is_callable) retval = zend_is_callable_ex(var, NULL, check_flags, &name, NULL, &error); zval_dtor(callable_name); //??? is it necessary to be consistent with old PHP ("\0" support) - if (UNEXPECTED(name->len) != strlen(name->val)) { - ZVAL_STRINGL(callable_name, name->val, strlen(name->val)); + if (UNEXPECTED(ZSTR_LEN(name)) != strlen(ZSTR_VAL(name))) { + ZVAL_STRINGL(callable_name, ZSTR_VAL(name), strlen(ZSTR_VAL(name))); zend_string_release(name); } else { ZVAL_STR(callable_name, name); |