Make sure value is correct

[MAILPOET-2535]
This commit is contained in:
Pavel Dohnal
2019-11-19 15:30:07 +01:00
committed by Jack Kitterhing
parent 4b649a0575
commit 2f262bc8ac

View File

@@ -13,6 +13,9 @@ class ExportFilesCleanup extends SimpleWorker {
function processTaskStrategy(ScheduledTask $task) {
$iterator = new \GlobIterator(Export::getExportPath() . '/' . Export::getFilePrefix() . '*.*');
foreach ($iterator as $file) {
if (is_string($file)) {
continue;
}
$name = $file->getPathname();
$created = $file->getMTime();
$now = new Carbon();