Skip to content

Commit

Permalink
fix: Fixed an issue where toArray() was done recursively on the pas…
Browse files Browse the repository at this point in the history
…sed in `$critera`, which turned objects into sub-arrays in `orderBy` and other properties, causing a DB error ([#51](#51)) ([#50](#50))
  • Loading branch information
khalwat committed Jun 20, 2024
1 parent 30f506f commit a3a6fec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/Similar.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,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 a3a6fec

Please sign in to comment.