Skip to content

Commit b797cc3

Browse files
committed
Fixed #17160
1 parent 9ed97e4 commit b797cc3

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- Fixed a bug where the `forms.checkboxField` macro wasn’t respecting `fieldset` and `checkboxLabel` keys passed into its config.
77
- Fixed an error that could occur when backing up the database, if the database password contained special characters. ([#17158](https://github.com/craftcms/cms/issues/17158))
88
- Fixed a PHP deprecation error that could occur when applying the `replace` Twig filter to a `null` variable. ([#17159](https://github.com/craftcms/cms/issues/17159))
9+
- Fixed a bug where GraphQL queries could return unexpected results. ([#17160](https://github.com/craftcms/cms/issues/17160))
910

1011
## 5.7.2 - 2025-04-22
1112

src/services/Elements.php

+5
Original file line numberDiff line numberDiff line change
@@ -3125,6 +3125,11 @@ public function createEagerLoadingPlans(string|array $with): array
31253125
foreach ($with as $path) {
31263126
// Is this already an EagerLoadPlan object?
31273127
if ($path instanceof EagerLoadPlan) {
3128+
// Make sure $all is true if $count is false
3129+
if (!$path->count && !$path->all) {
3130+
$path->all = true;
3131+
}
3132+
31283133
// Don't index the plan by its alias, as two plans w/ different `when` filters could be using the same alias.
31293134
// Side effect: mixing EagerLoadPlan objects and arrays could result in redundant element queries,
31303135
// but that would be a weird thing to do.

0 commit comments

Comments
 (0)