From a42256b296f14c5f82889f9e222d94a416aa1924 Mon Sep 17 00:00:00 2001 From: czaks Date: Thu, 5 May 2016 08:43:34 +0200 Subject: [PATCH] locale cache: fix a bug when perms are done wrong --- inc/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/functions.php b/inc/functions.php index fd4c910d..462bc173 100755 --- a/inc/functions.php +++ b/inc/functions.php @@ -127,7 +127,7 @@ function loadConfig() { // So, we may store the locale in a tmp/ filesystem. if (file_exists($fn = 'tmp/cache/locale_' . $boardsuffix ) ) { - $config['locale'] = file_get_contents($fn); + $config['locale'] = @file_get_contents($fn); } else { $config['locale'] = 'en'; @@ -144,7 +144,7 @@ function loadConfig() { $config['locale'] = $matches[count($matches)-1]; } - file_put_contents($fn, $config['locale']); + @file_put_contents($fn, $config['locale']); } if ($config['locale'] != $current_locale) {