Skip to content

Commit 17e4f3e

Browse files
committed
Make sure we have a document before dumping it
1 parent 282e540 commit 17e4f3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

php_phongo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,7 @@ void php_phongo_result_to_zval(zval *retval, php_phongo_result_t *result) /* {{{
11711171
#undef _ADD_INT
11721172

11731173
add_assoc_string_ex(cursor, ZEND_STRS("ns"), result->cursor->ns, 1);
1174-
{
1174+
if (result->cursor->current) {
11751175
php_phongo_bson_state state = PHONGO_BSON_STATE_INITIALIZER;
11761176

11771177
MAKE_STD_ZVAL(state.zchild);

0 commit comments

Comments
 (0)