Skip to content

Commit

Permalink
OM PR 4394
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano committed Feb 3, 2025
1 parent 422f483 commit b8f2a57
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/code/core/Mage/Core/Helper/UnserializeArray.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ class Mage_Core_Helper_UnserializeArray
* @param string $str
* @return array
* @throws Exception
* @SuppressWarnings("PHPMD.ErrorControlOperator")
*/
public function unserialize($str)
{
try {
$result = unserialize($str, ['allowed_classes' => false]);
$str = is_null($str) ? '' : $str;
$result = @unserialize($str, ['allowed_classes' => false]);
if ($result === false && $str !== serialize(false)) {
throw new Exception('Error unserializing data.');
}
Expand Down

0 comments on commit b8f2a57

Please sign in to comment.