mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Replaced wrong check with proper ZEND_ASSERT()
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user