Skip to content

Commit

Permalink
Merge pull request #55 from philipobenito/patch-1
Browse files Browse the repository at this point in the history
Update unserialize function to pass through optional arg $options
  • Loading branch information
msarca authored May 22, 2020
2 parents 2e3299c + 0eca08c commit 40a73dc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ function serialize($data)
* Unserialize
*
* @param $data
* @param $options
* @return mixed
*/
function unserialize($data)
function unserialize($data, array $options = null)
{
SerializableClosure::enterContext();
$data = \unserialize($data);
$data = \unserialize($data, $options);
SerializableClosure::unwrapClosures($data);
SerializableClosure::exitContext();
return $data;
Expand Down

0 comments on commit 40a73dc

Please sign in to comment.