From 180da03f08da91b0ea69981e9ae48dd4d2a63afe Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Mon, 4 May 2020 14:54:23 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B02980=20Fix=20backup=20not=20executed=20a?= =?UTF-8?q?nymore=20Regression=20introduced=20by=20#89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/backgroundprocess.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/backgroundprocess.inc.php b/core/backgroundprocess.inc.php index ba5c78891..05f28ece2 100644 --- a/core/backgroundprocess.inc.php +++ b/core/backgroundprocess.inc.php @@ -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)