From: derpierre65 Date: Tue, 28 Nov 2017 14:47:04 +0000 (+0100) Subject: fixed dow & month X-Git-Tag: 3.1.0_Beta_4~34^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=db48b950cde2c6db084e3711f57b5ea620960756;p=GitHub%2FWoltLab%2FWCF.git fixed dow & month I think that is the desired effect? --- 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; }