Skip to content

Commit bbc0e8e

Browse files
Fixed bug ErrorException
Fixed bug where a timeout in the update server response would throw an Error Exception
1 parent 4e78b1a commit bbc0e8e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

resources/views/layouts/sidebar.blade.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,16 @@ function update_color_scheme() {
130130
<! –– #### begin update detection #### ––>
131131
132132
<?php // Checks if URL exists
133+
try {
133134
function URL_exists(string $url): bool
134135
{
135136
return str_contains(get_headers($url)[0], "200 OK");
136137
}
137138
// Sets $ServerExists to true if URL exists
138139
if (URL_exists("https://littlelink-custom.tru.io/version.json")){
139140
$ServerExists = "true";
140-
} else {
141+
}
142+
} catch (exception $e) {
141143
$ServerExists = "false";
142144
}
143145
?>

0 commit comments

Comments
 (0)