Fixed closing of mysql statement in image code

This commit is contained in:
Travis Burtrum 2012-12-26 21:59:41 -05:00
parent ed88e3c9c2
commit eb24ea6965

View File

@ -60,7 +60,6 @@ function centerTtfString($image, $string, $font_size, $y, $font = null) {
}
function echoImage($online = -1, $text = 'Error!', $size_req = '') {
close_mysql();
global $g_source_dir;
if ($online == 1)
@ -143,9 +142,10 @@ function gen_image() {
// if there is no server in the database, forward to error
if (!$stmt->fetch())
echoImage(-1, $server, $size_req);
$online = -1;
$stmt->close();
close_mysql();
// forward to the right page
echoImage($online, $server, $size_req);