diff --git a/Classes/Converter/JsonCompatibilityConverter.php b/Classes/Converter/JsonCompatibilityConverter.php index d915d903d..dca02e7c4 100644 --- a/Classes/Converter/JsonCompatibilityConverter.php +++ b/Classes/Converter/JsonCompatibilityConverter.php @@ -36,6 +36,11 @@ class JsonCompatibilityConverter */ public function convert(string $dataString) { + $decoded = json_decode($dataString, true); + if ($decoded) { + return $decoded; + } + $unserialized = unserialize($dataString, ['allowed_classes' => false]); if (is_object($unserialized)) { throw new \Exception('Objects are not allowed: ' . var_export($unserialized, true), 1593758307); @@ -45,11 +50,6 @@ public function convert(string $dataString) return $unserialized; } - $decoded = json_decode($dataString, true); - if ($decoded) { - return $decoded; - } - return false; } }