com php-src: Merge branch 'PHP-5.6' into PHP-7.0: ext/spl/spl _iterators.c

From: Date: Thu, 22 Sep 2016 10:48:38 +0000
Subject: com php-src: Merge branch 'PHP-5.6' into PHP-7.0: ext/spl/spl _iterators.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-94619@lists.php.net to get a copy of this message
Commit: c38f88ddb077f815bfdfff5c63ec76c6f6119c18 Author: Nikita Popov <nikic@php.net> Thu, 22 Sep 2016 12:48:38 +0200 Parents: 68e602ff0a31f1c90ba3ad8717ae3a86d10854c7 4397306b322dc650a6d931bfecdb64cc56678c08 Branches: PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c38f88ddb077f815bfdfff5c63ec76c6f6119c18 Log: Merge branch 'PHP-5.6' into PHP-7.0 Changed paths: MM ext/spl/spl_iterators.c Diff: diff --cc ext/spl/spl_iterators..c index 0977228,878e5a1..7b4c73d --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@@ -2042,19 -2048,29 +2042,20 @@@ SPL_METHOD(RegexIterator, accept 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)

« previous php.cvs (#94619) next »