1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-15 11:14:12 +02:00
This commit is contained in:
Ryan Cramer
2021-01-12 07:02:42 -05:00
parent 3370e10802
commit a7d0ec1c91

View File

@@ -449,8 +449,8 @@ class WireCache extends Wire {
$data = json_encode($data); $data = json_encode($data);
if($data === false) throw new WireException("Unable to encode array data for cache: $name"); if($data === false) throw new WireException("Unable to encode array data for cache: $name");
} else if(is_string($data) && $this->looksLikeJSON($data)) { } else if(is_string($data) && $this->looksLikeJSON($data)) {
// ensure potentailly already encoded JSON text remains as text when cache is awakened // ensure potentially already encoded JSON text remains as text when cache is awakened
$data = array('WireCache' => $data); $data = json_encode(array('WireCache' => $data));
} }
if(is_null($data)) $data = ''; if(is_null($data)) $data = '';