From 5644286de5257d38cdcf5a7803913ff39ff80cf9 Mon Sep 17 00:00:00 2001 From: Ng Kiat Siong Date: Thu, 28 Nov 2024 10:17:02 +0800 Subject: [PATCH] Fixed issue #4352 null deprecation in UnserializeArray.php --- app/code/core/Mage/Core/Helper/UnserializeArray.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/core/Mage/Core/Helper/UnserializeArray.php b/app/code/core/Mage/Core/Helper/UnserializeArray.php index c5437673dcf..564189e8600 100644 --- a/app/code/core/Mage/Core/Helper/UnserializeArray.php +++ b/app/code/core/Mage/Core/Helper/UnserializeArray.php @@ -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)) {