Skip to content

Commit

Permalink
fix PHPStan error
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikus Rozenbergs committed Mar 7, 2024
1 parent b66a3d1 commit 744c7a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion update/lv.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ function getJsonString(string $url): bool|string
{
$data = file_get_contents($url);

$nameDays = parseNames(explode("\n", $data));
$nameDays = [];
if($data) {
$nameDays = parseNames(explode("\n", $data));
}

return json_encode($nameDays, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
}
Expand Down

0 comments on commit 744c7a0

Please sign in to comment.