File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -248,7 +248,9 @@ public function query(Query $query): QueryResult
248
248
/** @var class-string<ModelInterface> $modelClass */
249
249
$ modelClass = $ query ->modelClassName ;
250
250
$ model = $ modelClass ::getModelFromData ($ row );
251
- $ result ->add ($ model );
251
+ if ($ model ) {
252
+ $ result ->add ($ model );
253
+ }
252
254
}
253
255
254
256
return $ result ;
Original file line number Diff line number Diff line change @@ -250,7 +250,17 @@ public static function matchesFilters(array $rawData): bool
250
250
return true ;
251
251
}
252
252
foreach (static ::$ filters as $ key => $ value ) {
253
- if (!isset ($ rawData [$ key ]) || $ rawData [$ key ] !== $ value ) {
253
+ if (!isset ($ rawData [$ key ])) {
254
+ return false ;
255
+ }
256
+ $ dataValue = $ rawData [$ key ];
257
+ if (is_int ($ value ) && !is_int ($ dataValue )) {
258
+ $ dataValue = (int )$ dataValue ;
259
+ } elseif (is_float ($ value ) && !is_float ($ dataValue )) {
260
+ $ dataValue = (float )$ dataValue ;
261
+ }
262
+
263
+ if ($ value !== $ dataValue ) {
254
264
return false ;
255
265
}
256
266
}
You can’t perform that action at this time.
0 commit comments