diff options
-rwxr-xr-x | bin/refresh-fb-cache.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/refresh-fb-cache.php b/bin/refresh-fb-cache.php index 35c7822..b8711a0 100755 --- a/bin/refresh-fb-cache.php +++ b/bin/refresh-fb-cache.php @@ -16,8 +16,9 @@ foreach ($cacheFiles as $file) { $cacheTime = filemtime($file); if ($cacheTime < $oldestCache) { $oldestCache = $cacheTime; - $fileToFetch = explode('.', $file); - $fileToFetch = $fileToFetch[count($fileToFetch)-1]; + $fileToFetch = explode('.', basename($file)); + array_shift($fileToFetch); + $fileToFetch = implode('.', $fileToFetch); } } } |