diff options
author | Dmitry Stogov <dmitry@zend.com> | 2016-06-08 12:11:47 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2016-06-08 12:11:47 +0300 |
commit | b03dce0cb3cf9442166e3183ceea00191a8d6f98 (patch) | |
tree | 5ed2f872d3f513f75182964f5c7cecb3658420b8 /Zend/zend_iterators.c | |
parent | fc587c7c5535bea772740cfebcca0e3d358dbb4c (diff) | |
download | php-git-b03dce0cb3cf9442166e3183ceea00191a8d6f98.tar.gz |
Replaced wrong check with proper ZEND_ASSERT()
Diffstat (limited to 'Zend/zend_iterators.c')
-rw-r--r-- | Zend/zend_iterators.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |