Skip to content

Commit

Permalink
Merge pull request #1 from mrsmoking/fix-warnings
Browse files Browse the repository at this point in the history
fix warning in find_by_pk (Model.php)
  • Loading branch information
mrsmoking authored Aug 27, 2021
2 parents 403beee + b104bef commit 4e4126a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -1666,8 +1666,9 @@ public static function find_by_pk($values, $options)
$list = $table->find($options);
}
$results = count($list);
$expected = is_array($values) ? count($values) : 1;

if ($results != ($expected = count($values)))
if ($results != $expected)
{
$class = get_called_class();
if (is_array($values))
Expand Down

0 comments on commit 4e4126a

Please sign in to comment.