Fix overload with a protection for rare case with very high nb of event

This commit is contained in:
Laurent Destailleur 2017-07-12 23:05:26 +02:00
parent 0d4d4516c8
commit 4b4dcf2e01

View File

@ -543,8 +543,10 @@ $resql=$db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$MAXONSAMEPAGE=10000; // Useless to have more. Protection to avoid memory overload when high number of event (for example after a mass import)
$i=0;
while ($i < $num)
while ($i < $num && $i < $MAXONSAMEPAGE)
{
$obj = $db->fetch_object($resql);