From 04f110a0a4c1ee93e4da5a994341ff0ab5fdf340 Mon Sep 17 00:00:00 2001 From: Denis Ovsienko Date: Sat, 2 Aug 2008 22:50:55 +0000 Subject: [PATCH] r2102 + showError(): don't reveal the full path to the file --- inc/interface.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/inc/interface.php b/inc/interface.php index bdf263e2..798eec63 100644 --- a/inc/interface.php +++ b/inc/interface.php @@ -171,10 +171,14 @@ function renderRow ($row_id = 0) echo ""; } -function showError ($info = '', $funcname = 'N/A') +function showError ($info = '', $location = 'N/A') { global $root; - echo "
An error has occured in [${funcname}]. "; + if (preg_match ('/\.php$/', $location)) + $location = basename ($location); + elseif ($location != 'N/A') + $location = $location . '()'; + echo "
An error has occured in [${location}]. "; if (empty ($info)) echo 'No additional information is available.'; else -- 2.25.1