mirror of
https://github.com/moparisthebest/Server-Status-Page
synced 2025-02-21 13:11:45 -05:00
Fixed closing of mysql statement in image code
This commit is contained in:
parent
ed88e3c9c2
commit
eb24ea6965
@ -60,7 +60,6 @@ function centerTtfString($image, $string, $font_size, $y, $font = null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function echoImage($online = -1, $text = 'Error!', $size_req = '') {
|
function echoImage($online = -1, $text = 'Error!', $size_req = '') {
|
||||||
close_mysql();
|
|
||||||
global $g_source_dir;
|
global $g_source_dir;
|
||||||
|
|
||||||
if ($online == 1)
|
if ($online == 1)
|
||||||
@ -143,9 +142,10 @@ function gen_image() {
|
|||||||
|
|
||||||
// if there is no server in the database, forward to error
|
// if there is no server in the database, forward to error
|
||||||
if (!$stmt->fetch())
|
if (!$stmt->fetch())
|
||||||
echoImage(-1, $server, $size_req);
|
$online = -1;
|
||||||
|
|
||||||
$stmt->close();
|
$stmt->close();
|
||||||
|
close_mysql();
|
||||||
|
|
||||||
// forward to the right page
|
// forward to the right page
|
||||||
echoImage($online, $server, $size_req);
|
echoImage($online, $server, $size_req);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user