if (zend_parse_parameters_none() == FAILURE) {
return;
}
-
+
SPL_FETCH_AND_CHECK_DUAL_IT(intern, getThis());
-
- if (intern->current.data == NULL) {
+
+ if (Z_TYPE(intern->current.data) == IS_UNDEF) {
RETURN_FALSE;
- } else if (Z_TYPE(intern->current.data) == IS_ARRAY) {
- RETURN_FALSE;
}
if (intern->u.regex.flags & REGIT_USE_KEY) {
- subject_ptr = intern->current.key;
+ subject = zval_get_string(&intern->current.key);
} else {
- if (Z_TYPE_P(intern->current.data) == IS_ARRAY) {
++ if (Z_TYPE(intern->current.data) == IS_ARRAY) {
+ RETURN_FALSE;
+ }
- subject_ptr = intern->current.data;
- }
-
- zend_make_printable_zval(subject_ptr, &subject_copy, &use_copy);
- if (use_copy) {
- subject = Z_STRVAL(subject_copy);
- subject_len = Z_STRLEN(subject_copy);
- } else {
- subject = Z_STRVAL_P(subject_ptr);
- subject_len = Z_STRLEN_P(subject_ptr);
+ subject = zval_get_string(&intern->current.data);
}
switch (intern->u.regex.mode)