Skip to content

Commit

Permalink
Fixed bug ErrorException
Browse files Browse the repository at this point in the history
Fixed bug where a timeout in the update server response would throw an Error Exception
  • Loading branch information
JulianPrieber authored Feb 23, 2022
1 parent 4e78b1a commit bbc0e8e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion resources/views/layouts/sidebar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,16 @@ function update_color_scheme() {
<! –– #### begin update detection #### ––>
<?php // Checks if URL exists
try {
function URL_exists(string $url): bool
{
return str_contains(get_headers($url)[0], "200 OK");
}
// Sets $ServerExists to true if URL exists
if (URL_exists("https://littlelink-custom.tru.io/version.json")){
$ServerExists = "true";
} else {
}
} catch (exception $e) {
$ServerExists = "false";
}
?>
Expand Down

0 comments on commit bbc0e8e

Please sign in to comment.