From: Tim Düsterhus Date: Tue, 18 Oct 2011 16:40:20 +0000 (+0200) Subject: Fixing callback in DiskCacheSource X-Git-Tag: 2.0.0_Beta_1~1680^2~7^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=af5b4eb568ab94a7efd4a878a1975f0d0601117c;p=GitHub%2FWoltLab%2FWCF.git Fixing callback in DiskCacheSource --- 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'); } /**