From eb24ea6965c34be3b1612e5ca07f43d3aa9e23bf Mon Sep 17 00:00:00 2001 From: moparisthebest Date: Wed, 26 Dec 2012 21:59:41 -0500 Subject: [PATCH] Fixed closing of mysql statement in image code --- ss_sources/image_server.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ss_sources/image_server.php b/ss_sources/image_server.php index f78cf7b..6f3ee5c 100755 --- a/ss_sources/image_server.php +++ b/ss_sources/image_server.php @@ -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);