forked from Wavyzz/dolibarr
Fix overload with a protection for rare case with very high nb of event
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user