From 995114a4c2c7c4903b2f5123ca0c8d53cdf6d76b Mon Sep 17 00:00:00 2001 From: mohrt Date: Fri, 7 Mar 2003 19:29:01 +0000 Subject: [PATCH] change E_USER_ERROR to E_USER_NOTICE --- libs/plugins/function.html_image.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/libs/plugins/function.html_image.php b/libs/plugins/function.html_image.php index 4bffbb6e..34401dd1 100644 --- a/libs/plugins/function.html_image.php +++ b/libs/plugins/function.html_image.php @@ -69,7 +69,8 @@ function smarty_function_html_image($params, &$smarty) } if (empty($file)) { - $smarty->trigger_error("html_image: missing 'file' parameter", E_USER_ERROR); + $smarty->trigger_error("html_image: missing 'file' parameter", E_USER_NOTICE); + return; } if(substr($file,0,1) == DIR_SEP) { @@ -81,15 +82,19 @@ function smarty_function_html_image($params, &$smarty) if(!isset($params['width']) || !isset($params['height'])) { if(!$_image_data = @getimagesize($_image_path)) { if(!file_exists($_image_path)) { - $smarty->trigger_error("html_image: unable to find '$_image_path'", E_USER_ERROR); + $smarty->trigger_error("html_image: unable to find '$_image_path'", E_USER_NOTICE); + return; } else if(!is_readable($_image_path)) { - $smarty->trigger_error("html_image: unable to read '$_image_path'", E_USER_ERROR); + $smarty->trigger_error("html_image: unable to read '$_image_path'", E_USER_NOTICE); + return; } else { - $smarty->trigger_error("html_image: '$_image_path' is not a valid image file", E_USER_ERROR); + $smarty->trigger_error("html_image: '$_image_path' is not a valid image file", E_USER_NOTICE); + return; } } if(!$smarty->security && !$smarty->_is_secure('file', $_image_path)) { - $smarty->trigger_error("html_image: (secure) '$_image_path' not in secure directory", E_USER_ERROR); + $smarty->trigger_error("html_image: (secure) '$_image_path' not in secure directory", E_USER_NOTICE); + return; } if(!isset($params['width'])) {