From 5cfb433087f18d1a283a3773dbc64ce4ea319152 Mon Sep 17 00:00:00 2001 From: Seb Date: Thu, 7 Sep 2017 15:15:13 +0200 Subject: [PATCH] check if function apc_delete_file() exist before call it (#277) --- Translation/Translator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Translation/Translator.php b/Translation/Translator.php index 70489143..49a3d5ee 100644 --- a/Translation/Translator.php +++ b/Translation/Translator.php @@ -108,7 +108,7 @@ public function removeLocalesCacheFiles(array $locales) */ protected function invalidateSystemCacheForFile($path) { - if (ini_get('apc.enabled')) { + if (ini_get('apc.enabled') && function_exists('apc_delete_file')) { if (apc_exists($path) && !apc_delete_file($path)) { throw new \RuntimeException(sprintf('Failed to clear APC Cache for file %s', $path)); }