Skip to content

Commit 6d15c0f

Browse files
author
Till Brehm
committed
Merge branch 'patch-2' into 'master'
Update cron.inc.php See merge request ispconfig/ispconfig3!710
2 parents bc3ff22 + 19cf886 commit 6d15c0f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

server/lib/classes/cron.inc.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,10 @@ private function _getNextValue($sField, $iValue, $bIncludeCurrent = false) {
264264
if(!array_key_exists($sField, $this->_aValidValues)) return false;
265265

266266
reset($this->_aValidValues[$sField]);
267-
while(($cur = each($this->_aValidValues[$sField])) !== false) {
268-
if($bIncludeCurrent == true && $cur['value'] >= $iValue) return $cur['value'];
269-
elseif($cur['value'] > $iValue) return $cur['value'];
267+
268+
foreach($this->_aValidValues[$sField] as $key => $value) {
269+
if($bIncludeCurrent == true && $value >= $iValue) return $value;
270+
elseif($value > $iValue) return $value;
270271
}
271272
return reset($this->_aValidValues[$sField]);
272273
}

0 commit comments

Comments
 (0)