Skip to content

Commit

Permalink
Merge pull request #51 from CakeDC/hotfix/constant-strategy
Browse files Browse the repository at this point in the history
Fix ConstStrategy
  • Loading branch information
rafaelqueiroz authored May 3, 2021
2 parents 7d3cff3 + f6c3eac commit 7c2c85e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Model/Behavior/Strategy/ConstStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function beforeFind(\Cake\Event\EventInterface $event, \Cake\ORM\Query $q

$query->formatResults(function (\Cake\Collection\CollectionInterface $results) {
return $results->map(function ($row) {
if (is_string($row)) {
if (is_string($row) || !$row) {
return $row;
}

Expand Down

0 comments on commit 7c2c85e

Please sign in to comment.