older error logs were sometimes not deleted at the appropriate time
authorMarcel Werk <burntime@woltlab.com>
Thu, 13 Feb 2020 10:13:21 +0000 (11:13 +0100)
committerMarcel Werk <burntime@woltlab.com>
Thu, 13 Feb 2020 10:13:21 +0000 (11:13 +0100)
filectime may differ from filemtime

wcfsetup/install/files/lib/system/cronjob/DailyCleanUpCronjob.class.php

index 190cc690531a540ae3cce4a1f3324d1c25a8debf..b57cea40c0cc79fda0bcbfee7a109afafd8b0c4c 100644 (file)
@@ -156,7 +156,7 @@ class DailyCleanUpCronjob extends AbstractCronjob {
                $files = @glob(WCF_DIR.'log/*.txt');
                if (is_array($files)) {
                        foreach ($files as $filename) {
-                               if (filectime($filename) < TIME_NOW - 86400 * 14) {
+                               if (filemtime($filename) < TIME_NOW - 86400 * 14) {
                                        @unlink($filename);
                                }
                        }