Skip to content

Commit

Permalink
Fix short array syntax breaking PHP 5.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Brumann committed Dec 30, 2016
1 parent 0a40387 commit 92f2e0b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Unserialize.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@ public static function unserialize($serialized, array $options = array())
return \unserialize($serialized);
}
if (false === $allowedClasses) {
$allowedClasses = [];
$allowedClasses = array();
}
if (!is_array($allowedClasses)) {
trigger_error(
'unserialize(): allowed_classes option should be array or boolean',
E_USER_WARNING
);
$allowedClasses = array();
}
$sanitizedSerialized = preg_replace_callback(
'/\bO:\d+:"([^"]*)":(\d+):{/',
Expand Down

0 comments on commit 92f2e0b

Please sign in to comment.