Skip to content

Commit 0273c79

Browse files
committed
Merged pull request #823
2 parents 85e5819 + 6e6380e commit 0273c79

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/MongoDB/Query.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,15 @@ static bool php_phongo_query_opts_append_document(bson_t* opts, const char* opts
8282
return true;
8383
} /* }}} */
8484

85-
#define PHONGO_QUERY_OPT_BOOL_EX(opt, zarr, key, deprecated) \
86-
if ((zarr) && php_array_existsc((zarr), (key))) { \
87-
if ((deprecated)) { \
85+
#define PHONGO_QUERY_OPT_BOOL_EX(opt, zarr, key, deprecated) \
86+
if ((zarr) && php_array_existsc((zarr), (key))) { \
87+
if ((deprecated)) { \
8888
php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "The \"%s\" option is deprecated and will be removed in a future release", key); \
89-
} \
90-
if (!BSON_APPEND_BOOL(intern->opts, (opt), php_array_fetchc_bool((zarr), (key)))) { \
91-
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT TSRMLS_CC, "Error appending \"%s\" option", (opt)); \
92-
return false; \
93-
} \
89+
} \
90+
if (!BSON_APPEND_BOOL(intern->opts, (opt), php_array_fetchc_bool((zarr), (key)))) { \
91+
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT TSRMLS_CC, "Error appending \"%s\" option", (opt)); \
92+
return false; \
93+
} \
9494
}
9595

9696
#define PHONGO_QUERY_OPT_BOOL(opt, zarr, key) PHONGO_QUERY_OPT_BOOL_EX((opt), (zarr), (key), 0)
@@ -106,15 +106,15 @@ static bool php_phongo_query_opts_append_document(bson_t* opts, const char* opts
106106
/* Note: handling of integer options will depend on SIZEOF_ZEND_LONG and we
107107
* are not converting strings to 64-bit integers for 32-bit platforms. */
108108

109-
#define PHONGO_QUERY_OPT_INT64_EX(opt, zarr, key, deprecated) \
110-
if ((zarr) && php_array_existsc((zarr), (key))) { \
111-
if ((deprecated)) { \
109+
#define PHONGO_QUERY_OPT_INT64_EX(opt, zarr, key, deprecated) \
110+
if ((zarr) && php_array_existsc((zarr), (key))) { \
111+
if ((deprecated)) { \
112112
php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "The \"%s\" option is deprecated and will be removed in a future release", key); \
113-
} \
114-
if (!BSON_APPEND_INT64(intern->opts, (opt), php_array_fetchc_long((zarr), (key)))) { \
115-
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT TSRMLS_CC, "Error appending \"%s\" option", (opt)); \
116-
return false; \
117-
} \
113+
} \
114+
if (!BSON_APPEND_INT64(intern->opts, (opt), php_array_fetchc_long((zarr), (key)))) { \
115+
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT TSRMLS_CC, "Error appending \"%s\" option", (opt)); \
116+
return false; \
117+
} \
118118
}
119119

120120
#define PHONGO_QUERY_OPT_INT64(opt, zarr, key) PHONGO_QUERY_OPT_INT64_EX((opt), (zarr), (key), 0)

0 commit comments

Comments
 (0)