Skip to content

Commit

Permalink
Fixed issue OpenMage#4352 null deprecation in UnserializeArray.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kiatng committed Nov 28, 2024
1 parent 71e1479 commit 5644286
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/code/core/Mage/Core/Helper/UnserializeArray.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ class Mage_Core_Helper_UnserializeArray
*/
public function unserialize($str)
{
if (!is_string($str) || $str === '') {
throw new Exception('Error unserializing data.');
}
try {
$result = unserialize($str, ['allowed_classes' => false]);
if ($result === false && $str !== serialize(false)) {
Expand Down

0 comments on commit 5644286

Please sign in to comment.