Skip to content

Commit

Permalink
[BUGFIX] Prevent possible NULL parameter for json_decode()
Browse files Browse the repository at this point in the history
Resolves: #82
  • Loading branch information
xperseguers committed May 28, 2024
1 parent 1368e6e commit 6bed296
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Service/Tika/ServerService.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function ping()
public function extractMetadataFromLocalFile($fileName)
{
$content = $this->send('PUT', '/meta', 'application/json', $fileName);
$metadata = json_decode($content, true);
$metadata = empty($content) ? [] : json_decode($content, true);

return $metadata ?? [];
}
Expand Down

0 comments on commit 6bed296

Please sign in to comment.