From e8de5ed331aefaba360e34d85923afebc37f1b17 Mon Sep 17 00:00:00 2001 From: niekt0 Date: Tue, 15 Mar 2011 02:27:35 +0100 Subject: [PATCH] get_image_link fix --- wwwroot/inc/smarty/node_methodz/function.get_image_link.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wwwroot/inc/smarty/node_methodz/function.get_image_link.php b/wwwroot/inc/smarty/node_methodz/function.get_image_link.php index a391aa0..ca181f3 100644 --- a/wwwroot/inc/smarty/node_methodz/function.get_image_link.php +++ b/wwwroot/inc/smarty/node_methodz/function.get_image_link.php @@ -2,6 +2,8 @@ function smarty_function_get_image_link($params,&$smarty) { global $db; $id = $params['id']; + + if (!is_numeric($id)) { return 1;} $img = './'.SYSTEM_IMAGES.'/nodes/'.substr($id,0,1)."/".substr($id,1,1)."/$id.gif"; if (file_exists($img)) { @@ -16,6 +18,7 @@ function smarty_function_get_image_link($params,&$smarty) { } echo $imglink; } + return 0; } ?> -- 2.30.2