Skip to content
Browse files

fix #152

  • Loading branch information...
1 parent e0e62a6 commit 840a914c003b6874d51497c82019e5fa08bf759d krakjoe committed
Showing with 5 additions and 1 deletion.
  1. +5 −1 iterators/default.h
View
6 iterators/default.h
@@ -77,7 +77,11 @@ static inline void pthreads_object_iterator_dtor(zend_object_iterator* iterator
}
static inline int pthreads_object_iterator_validate(zend_object_iterator* iterator TSRMLS_DC) {
- return (((pobject_iterator_t*)iterator)->end) ? FAILURE : SUCCESS;
+ pobject_iterator_t *intern = (pobject_iterator_t*) iterator;
+
+ if (zend_hash_num_elements(&intern->properties)) {
+ return (((pobject_iterator_t*)iterator)->end) ? FAILURE : SUCCESS;
+ } else return FAILURE;
}
static inline void pthreads_object_iterator_current_data(zend_object_iterator* iterator, zval ***data TSRMLS_DC) {

0 comments on commit 840a914

Please sign in to comment.
Something went wrong with that request. Please try again.