From 58ef8e62e55b740e8d97ca164289f2f6cd0096da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Tue, 23 Oct 2007 13:55:18 +0200 Subject: [PATCH] screenshot: Fix random screenshot function --- include/screenshot.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/screenshot.php b/include/screenshot.php index 611b83b..81eec26 100644 --- a/include/screenshot.php +++ b/include/screenshot.php @@ -464,6 +464,7 @@ class screenshot $bFormatting = true) { // initialize variables to avoid notices when appending to them + $hResult = null; $sImgFile = ''; $sImg = ''; // we want a random screenshots for this app @@ -508,7 +509,7 @@ class screenshot $sZoomIcon = Screenshot::get_zoomicon_overlay(); /* we have screenshots */ - if(query_num_rows($hResult)) + if($hResult && query_num_rows($hResult)) { if($iVersionId) $sImg .= "".$sImgFile.$sZoomIcon."
View/Submit Screenshot
";