File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -2475,17 +2475,19 @@ protected function buildFilter(Query $query): array
24752475 {
24762476 // Normalize extended ISO 8601 datetime strings in query values to UTCDateTime
24772477 // so they can be correctly compared against datetime fields stored in MongoDB.
2478- $ values = $ query ->getValues ();
2479- foreach ($ values as $ k => $ value ) {
2480- if (is_string ($ value ) && $ this ->isExtendedISODatetime ($ value )) {
2481- try {
2482- $ values [$ k ] = $ this ->toMongoDatetime ($ value );
2483- } catch (\Throwable $ th ) {
2484- // Leave value as-is if it cannot be parsed as a datetime
2478+ if (!$ this ->getSupportForAttributes ()) {
2479+ $ values = $ query ->getValues ();
2480+ foreach ($ values as $ k => $ value ) {
2481+ if (is_string ($ value ) && $ this ->isExtendedISODatetime ($ value )) {
2482+ try {
2483+ $ values [$ k ] = $ this ->toMongoDatetime ($ value );
2484+ } catch (\Throwable $ th ) {
2485+ // Leave value as-is if it cannot be parsed as a datetime
2486+ }
24852487 }
24862488 }
2489+ $ query ->setValues ($ values );
24872490 }
2488- $ query ->setValues ($ values );
24892491
24902492 if ($ query ->getAttribute () === '$id ' ) {
24912493 $ query ->setAttribute ('_uid ' );
You can’t perform that action at this time.
0 commit comments