Skip to content

Commit

Permalink
Implement php7.4+ preferred serialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralflang committed Aug 16, 2022
1 parent 8b392e3 commit dd112af
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/Horde/Cache/Storage/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ public function serialize()
$this->_logger
));
}
public function __serialize(): array
{
return [
$this->_params,
$this->_logger
];
}

/**
*/
Expand All @@ -131,5 +138,10 @@ public function unserialize($data)
@list($this->_params, $this->_logger) = @unserialize($data);
$this->_initOb();
}
public function __unserialize(array $data): void
{
list($this->_params, $this->_logger) = $data;
$this->_initOb();
}

}

0 comments on commit dd112af

Please sign in to comment.