mirror of
https://github.com/processwire/processwire.git
synced 2025-08-15 03:05:26 +02:00
Fix issue processwire/processwire-issues#919 (WireCache/JSON)
This commit is contained in:
@@ -449,8 +449,8 @@ class WireCache extends Wire {
|
||||
$data = json_encode($data);
|
||||
if($data === false) throw new WireException("Unable to encode array data for cache: $name");
|
||||
} else if(is_string($data) && $this->looksLikeJSON($data)) {
|
||||
// ensure potentailly already encoded JSON text remains as text when cache is awakened
|
||||
$data = array('WireCache' => $data);
|
||||
// ensure potentially already encoded JSON text remains as text when cache is awakened
|
||||
$data = json_encode(array('WireCache' => $data));
|
||||
}
|
||||
|
||||
if(is_null($data)) $data = '';
|
||||
|
Reference in New Issue
Block a user