Fix: wrong min value

This commit is contained in:
Regis Houssin 2017-05-24 19:33:44 +02:00
parent 6d4c5e4b4a
commit 659436f1ed

View File

@ -132,7 +132,8 @@ class Members extends DolibarrApi
{ {
$i=0; $i=0;
$num = $db->num_rows($result); $num = $db->num_rows($result);
while ($i < min($limit, $num)) $min = min($num, ($limit <= 0 ? $num : $limit));
while ($i < $min)
{ {
$obj = $db->fetch_object($result); $obj = $db->fetch_object($result);
$member = new Adherent($this->db); $member = new Adherent($this->db);