1
0
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:
Dmitry Stogov
2016-06-08 12:11:47 +03:00
parent fc587c7c55
commit b03dce0cb3

View File

@@ -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;