From: Dmitry Stogov Date: Wed, 8 Jun 2016 09:11:47 +0000 (+0300) Subject: Replaced wrong check with proper ZEND_ASSERT() X-Git-Tag: php-7.1.0alpha3~42^2~45 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b03dce0cb3cf9442166e3183ceea00191a8d6f98;p=php Replaced wrong check with proper ZEND_ASSERT() --- diff --git a/Zend/zend_iterators.c b/Zend/zend_iterators.c index 2f5a23e0f0..b08fc24831 100644 --- a/Zend/zend_iterators.c +++ b/Zend/zend_iterators.c @@ -90,8 +90,8 @@ ZEND_API void zend_iterator_dtor(zend_object_iterator *iter) ZEND_API zend_object_iterator* zend_iterator_unwrap(zval *array_ptr) { - if (Z_TYPE_P(array_ptr) && - Z_OBJ_HT_P(array_ptr) == &iterator_object_handlers) { + ZEND_ASSERT(Z_TYPE_P(array_ptr) == IS_OBJECT); + if (Z_OBJ_HT_P(array_ptr) == &iterator_object_handlers) { return (zend_object_iterator *)Z_OBJ_P(array_ptr); } return NULL;