diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index b8f9d3d14a4..0e7c814ef7b 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -378,8 +378,8 @@ else $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $result = $db->query($sql); - $nbtotalofrecords = $db->num_rows($result); + $resql = $db->query($sql); + $nbtotalofrecords = $db->num_rows($resql); if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 { $page = 0; @@ -396,7 +396,7 @@ if (! $resql) exit; } -$num = $db->num_rows($result); +$num = $db->num_rows($resql); $arrayofselected=is_array($toselect)?$toselect:array();