From 259e5ef9defeb8bb00270172a441890997573398 Mon Sep 17 00:00:00 2001 From: Teromene Date: Tue, 19 Jan 2016 12:18:54 +0000 Subject: [PATCH] Casting to UTF-8 before converting to JSON. --- caches/FileCache.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/caches/FileCache.php b/caches/FileCache.php index f2e0dbb7..f2a3ea87 100644 --- a/caches/FileCache.php +++ b/caches/FileCache.php @@ -24,6 +24,9 @@ class FileCache extends CacheAbstract{ public function saveData($datas){ $this->isPrepareCache(); + //Re-encode datas to UTF-8 + $datas = Cache::utf8_encode_deep($datas); + $writeStream = file_put_contents($this->getCacheFile(), json_encode($datas)); if(!$writeStream) {