Skip to content

Commit

Permalink
fix crawler:buildQueue
Browse files Browse the repository at this point in the history
  • Loading branch information
stephan-brun committed Jul 23, 2024
1 parent 3b2c544 commit 8edbb2a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Classes/Converter/JsonCompatibilityConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -45,11 +50,6 @@ public function convert(string $dataString)
return $unserialized;
}

$decoded = json_decode($dataString, true);
if ($decoded) {
return $decoded;
}

return false;
}
}

0 comments on commit 8edbb2a

Please sign in to comment.