File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ public function count() : JsonResponse {
170
170
try {
171
171
172
172
foreach ($ decodedRequestBody ['filter ' ] as &$ filterValue ) {
173
- if ( preg_match (MongoDB::REGEX , $ filterValue ) ) {
173
+ if ( is_string ( $ filterValue ) && preg_match (MongoDB::REGEX , $ filterValue ) ) {
174
174
$ filterValue = MongoDB::createRegexFromString ($ filterValue );
175
175
}
176
176
}
@@ -209,7 +209,7 @@ public function deleteOne() : JsonResponse {
209
209
try {
210
210
211
211
foreach ($ decodedRequestBody ['filter ' ] as &$ filterValue ) {
212
- if ( preg_match (MongoDB::REGEX , $ filterValue ) ) {
212
+ if ( is_string ( $ filterValue ) && preg_match (MongoDB::REGEX , $ filterValue ) ) {
213
213
$ filterValue = MongoDB::createRegexFromString ($ filterValue );
214
214
}
215
215
}
@@ -248,7 +248,7 @@ public function find() : JsonResponse {
248
248
try {
249
249
250
250
foreach ($ decodedRequestBody ['filter ' ] as &$ filterValue ) {
251
- if ( preg_match (MongoDB::REGEX , $ filterValue ) ) {
251
+ if ( is_string ( $ filterValue ) && preg_match (MongoDB::REGEX , $ filterValue ) ) {
252
252
$ filterValue = MongoDB::createRegexFromString ($ filterValue );
253
253
}
254
254
}
You can’t perform that action at this time.
0 commit comments