From 659f6376ca5e0d184585ef40dfc2e3c5256e4f17 Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 13 Feb 2008 16:24:59 +0000 Subject: Exception handling git-svn-id: https://code.elgg.org/elgg/trunk@25 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/input.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'engine/lib/input.php') diff --git a/engine/lib/input.php b/engine/lib/input.php index c62539f49..c1b575e64 100644 --- a/engine/lib/input.php +++ b/engine/lib/input.php @@ -12,20 +12,20 @@ */ /** - * Get some input from passed variables. + * Get some input from variables passed on the GET or POST line. * * @param $variable string The variable we want to return. * @param $default mixed A default value for the variable if it is not found. */ function get_input($variable, $default = "") { - - - // TODO: Some nice filtering here - if (isset($_REQUEST[$variable])) - return trim($_REQUEST[$variable]); - - return $default; + if (isset($_REQUEST[$variable])) { + $value = $_REQUEST[$variable]; + return trim($_REQUEST[$variable]); + } + + return $default; + } ?> \ No newline at end of file -- cgit v1.2.3