We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 148e726 commit 99d723eCopy full SHA for 99d723e
php_phongo.c
@@ -1240,7 +1240,9 @@ static void phongo_cursor_it_rewind(zend_object_iterator *iter TSRMLS_DC) /* {{{
1240
/* firstBatch is empty when the query simply didn't return any results */
1241
if (cursor_it->firstBatch) {
1242
if (cursor_it->is_command_cursor) {
1243
- bson_iter_init(&cursor_it->first_batch_iter, cursor_it->firstBatch);
+ if (!bson_iter_init(&cursor_it->first_batch_iter, cursor_it->firstBatch)) {
1244
+ return;
1245
+ }
1246
if (bson_iter_next (&cursor_it->first_batch_iter)) {
1247
if (BSON_ITER_HOLDS_DOCUMENT (&cursor_it->first_batch_iter)) {
1248
const uint8_t *data = NULL;
0 commit comments