Fix overload with a protection for rare case with very high nb of event
This commit is contained in:
parent
0d4d4516c8
commit
4b4dcf2e01
@ -543,8 +543,10 @@ $resql=$db->query($sql);
|
|||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($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;
|
$i=0;
|
||||||
while ($i < $num)
|
while ($i < $num && $i < $MAXONSAMEPAGE)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user