From af5b4eb568ab94a7efd4a878a1975f0d0601117c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 18 Oct 2011 18:40:20 +0200 Subject: [PATCH] Fixing callback in DiskCacheSource --- .../files/lib/system/cache/source/DiskCacheSource.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/system/cache/source/DiskCacheSource.class.php b/wcfsetup/install/files/lib/system/cache/source/DiskCacheSource.class.php index 73a840bda4..04bcc94a18 100644 --- a/wcfsetup/install/files/lib/system/cache/source/DiskCacheSource.class.php +++ b/wcfsetup/install/files/lib/system/cache/source/DiskCacheSource.class.php @@ -2,6 +2,7 @@ namespace wcf\system\cache\source; use wcf\system\exception\SystemException; use wcf\system\io\File; +use wcf\system\Callback; use wcf\system\WCF; use wcf\util\FileUtil; use wcf\util\DirectoryUtil; @@ -101,11 +102,11 @@ class DiskCacheSource implements ICacheSource { $directory .= '/'; } - DirectoryUtil::getInstance($directory)->executeCallback(function ($filename) { + DirectoryUtil::getInstance($directory)->executeCallback(new Callback(function ($filename) { if (!@touch($filename, 1)) { @unlink($filename); } - }, '%^'.$directory.$filepattern.'$%i'); + }), '%^'.$directory.$filepattern.'$%i'); } /** -- 2.20.1