Skip to content

Commit

Permalink
Remove json serialization
Browse files Browse the repository at this point in the history
Keep serialization format equal.
  • Loading branch information
mrubinsk committed Nov 6, 2022
1 parent 0830ac7 commit 864fce3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/Horde/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -600,15 +600,18 @@ public function close()
*/
public function serialize()
{
return json_encode($this->__serialize());
return serialize($this->__serialize());
}

/**
*/
public function unserialize($data)
{

$this->__unserialize(json_decode($data, true));
$data = @unserialize($data, true);
if ($data == null || !is_array($data)) {
throw new Exception('Cache version change.');
}
$this->__unserialize($data);
}

/**
Expand Down

0 comments on commit 864fce3

Please sign in to comment.