N°2980 Fix backup not executed anymore

Regression introduced by #89
This commit is contained in:
Pierre Goiffon
2020-05-04 14:54:23 +02:00
parent f92a980b4d
commit 180da03f08

View File

@@ -82,7 +82,8 @@ interface iScheduledProcess extends iProcess
*
* Other info (module name and time default value) should be provided using a method that needs to be implemented.
*
* @since 2.7.0
* @since 2.7.0 PR #89
* @since 2.7.0-2 N°2580 Fix {@link GetNextOccurrence} returning wrong value
*/
abstract class AbstractWeeklyScheduledProcess implements iScheduledProcess
{
@@ -191,7 +192,8 @@ abstract class AbstractWeeklyScheduledProcess implements iScheduledProcess
}
$oNow = new DateTime();
$iNextPos = false;
for ($iDay = $oNow->format('N'); $iDay <= 7; $iDay++)
$sDay = $oNow->format('N');
for ($iDay = (int) $sDay; $iDay <= 7; $iDay++)
{
$iNextPos = array_search($iDay, $aDays, true);
if ($iNextPos !== false)