Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #100 PHP error when eager loading orders on license query #107

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

- Fixed a bug where users with “Manage licenses” permission weren’t allowed to edit licenses. ([#105](https://github.com/craftcms/digital-products/issues/105))
- Fixed a PHP error that could occur when eager loading orders on a license query. ([#100](https://github.com/craftcms/digital-products/issues/100))

## 3.2.3 - 2023-09-11

Expand Down
1 change: 1 addition & 0 deletions src/elements/License.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ public static function eagerLoadingMap(array $sourceElements, string $handle): a
->select('id as source, orderId as target')
->from('{{%digitalproducts_licenses}}')
->where(['in', 'id', $sourceElementIds])
->andWhere(['not', ['orderId' => null]])
->all();

return [
Expand Down
Loading