Skip to content

Commit 907d9b0

Browse files
committed
initialize correctly
1 parent 17f3374 commit 907d9b0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

php_phongo.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ zend_bool phongo_writeconcernerror_init(zval *return_value, bson_t *bson TSRMLS_
273273
if (bson_iter_init_find(&iter, bson, "errInfo") && BSON_ITER_HOLDS_DOCUMENT(&iter)) {
274274
uint32_t len;
275275
const uint8_t *data;
276-
php_phongo_bson_state state = {NULL, {{NULL, 0}, {NULL, 0}}};
276+
php_phongo_bson_state state = {NULL, {NULL, NULL} };
277277

278278
bson_iter_document(&iter, &len, &data);
279279

@@ -1202,7 +1202,7 @@ static void phongo_cursor_it_get_current_data(zend_object_iterator *iter, zval *
12021202

12031203
static void phongo_cursor_it_move_forward(zend_object_iterator *iter TSRMLS_DC) /* {{{ */
12041204
{
1205-
php_phongo_bson_state state = {NULL, {{NULL, 0}, {NULL, 0}}};
1205+
php_phongo_bson_state state = {NULL, {NULL, NULL} };
12061206
phongo_cursor_it *cursor_it = (phongo_cursor_it *)iter;
12071207
const bson_t *doc;
12081208

@@ -1236,7 +1236,7 @@ static void phongo_cursor_it_move_forward(zend_object_iterator *iter TSRMLS_DC)
12361236

12371237
static void phongo_cursor_it_rewind(zend_object_iterator *iter TSRMLS_DC) /* {{{ */
12381238
{
1239-
php_phongo_bson_state state = {NULL, {{NULL, 0}, {NULL, 0}}};
1239+
php_phongo_bson_state state = {NULL, {NULL, NULL} };
12401240
phongo_cursor_it *cursor_it = (phongo_cursor_it *)iter;
12411241

12421242
/* firstBatch is empty when the query simply didn't return any results */

0 commit comments

Comments
 (0)