Casting to UTF-8 before converting to JSON.
This commit is contained in:
parent
5f01b7fe7d
commit
259e5ef9de
1 changed files with 3 additions and 0 deletions
|
@ -24,6 +24,9 @@ class FileCache extends CacheAbstract{
|
||||||
public function saveData($datas){
|
public function saveData($datas){
|
||||||
$this->isPrepareCache();
|
$this->isPrepareCache();
|
||||||
|
|
||||||
|
//Re-encode datas to UTF-8
|
||||||
|
$datas = Cache::utf8_encode_deep($datas);
|
||||||
|
|
||||||
$writeStream = file_put_contents($this->getCacheFile(), json_encode($datas));
|
$writeStream = file_put_contents($this->getCacheFile(), json_encode($datas));
|
||||||
|
|
||||||
if(!$writeStream) {
|
if(!$writeStream) {
|
||||||
|
|
Loading…
Reference in a new issue