mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +01:00
"fixed infinit loop in the select-number widget, if start and end value are identical, also fixing the code with should protect from showing more then 100 items in the selectbox"
This commit is contained in:
parent
548858e074
commit
2224267a7e
@ -383,11 +383,11 @@
|
||||
$format = '%0'.strlen($type3).'d';
|
||||
}
|
||||
$type3 = !$type3 ? 1 : intval($type3); // decrement
|
||||
if (($type < $type2) != ($type3 > 0))
|
||||
if (($type <= $type2) != ($type3 > 0))
|
||||
{
|
||||
$type3 = -$type3; // void infinite loop
|
||||
}
|
||||
for ($i=0,$n=$type; $n <= $type2 && $i <= 100; $n += $type3)
|
||||
for ($i=0,$n=$type; $n <= $type2 && $i <= 100; $n += $type3,++$i)
|
||||
{
|
||||
$cell['sel_options'][$n] = sprintf($format,$n);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user