Skip to content

Commit

Permalink
fix for receiving empty response
Browse files Browse the repository at this point in the history
  • Loading branch information
nekromoff committed Aug 23, 2024
1 parent db50707 commit 40058e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
// Check CRC32 hash of the latest code once a day
if (!file_exists('logs/' . $latest_code_filename) or filemtime('logs/' . $latest_code_filename) <= time() - 86400) {
$latest_code = file_get_contents(REPORT_PY_URL);
file_put_contents('logs/' . $latest_code_filename, $latest_code);
if (strlen($latest_code)) {
file_put_contents('logs/' . $latest_code_filename, $latest_code);
}
}
$crc32 = crc32(file_get_contents('logs/' . $latest_code_filename));

Expand Down

0 comments on commit 40058e1

Please sign in to comment.