Skip to content

Commit

Permalink
Merge branch 'release/4.0.2' into v4
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Jun 20, 2024
2 parents 9019793 + f96e775 commit 0d4f2e1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Similar Changelog

## 4.0.2 - 2024.06.20
### Fixed
* Fixed an issue where `toArray()` was done recursively on the passed in `$critera`, which turned objects into sub-arrays in `orderBy` and other properties, causing a DB error ([#51](https://github.com/nystudio107/craft-similar/issues/51)) ([#50](https://github.com/nystudio107/craft-similar/issues/50))

## 4.0.1 - 2024.04.28
### Added
* Added `ServicesTrait` for the plugin service component registration
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nystudio107/craft-similar",
"description": "Similar for Craft lets you find elements, Entries, Categories, Commerce Products, etc, that are similar, based on... other related elements.",
"type": "craft-plugin",
"version": "4.0.1",
"version": "4.0.2",
"keywords": [
"craft",
"cms",
Expand Down
2 changes: 1 addition & 1 deletion src/services/Similar.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function find(array $data): array|ElementInterface

if (is_object($criteria)) {
/** @var ElementQueryInterface $criteria */
$criteria = $criteria->toArray();
$criteria = $criteria->toArray([], [], false);
}

// Get an ElementQuery for this Element
Expand Down

0 comments on commit 0d4f2e1

Please sign in to comment.