Skip to content

Commit

Permalink
fix warning in find_by_pk (Model.php)
Browse files Browse the repository at this point in the history
  • Loading branch information
vingood committed Aug 27, 2021
1 parent 403beee commit b104bef
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 b104bef

Please sign in to comment.