From db48b950cde2c6db084e3711f57b5ea620960756 Mon Sep 17 00:00:00 2001 From: derpierre65 Date: Tue, 28 Nov 2017 15:47:04 +0100 Subject: [PATCH] fixed dow & month I think that is the desired effect? --- wcfsetup/install/files/lib/util/CronjobUtil.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/util/CronjobUtil.class.php b/wcfsetup/install/files/lib/util/CronjobUtil.class.php index 5089c82df3..b23c042b5a 100644 --- a/wcfsetup/install/files/lib/util/CronjobUtil.class.php +++ b/wcfsetup/install/files/lib/util/CronjobUtil.class.php @@ -109,8 +109,8 @@ final class CronjobUtil { switch ($fieldName) { case 'dow': - if (strlen($fieldValue) == 3 && in_array($fieldName, $dayNames)) { - $fieldValue = $dayNames[$fieldValue]; + if (strlen($fieldValue) == 3 && in_array($fieldValue, $dayNames)) { + $fieldValue = array_search($fieldValue, $dayNames); } // When specifying day of week, both day 0 and day 7 // will be considered Sunday. -- crontab(5) @@ -121,7 +121,7 @@ final class CronjobUtil { case 'month': if (strlen($fieldValue) == 3 && in_array($fieldValue, $monthNames)) { - $fieldValue = $monthNames[$fieldValue] + 1; + $fieldValue = array_search($fieldValue, $monthNames) + 1; } break; } -- 2.20.1