aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/input.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-02-13 16:24:59 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-02-13 16:24:59 +0000
commit659f6376ca5e0d184585ef40dfc2e3c5256e4f17 (patch)
tree311640cdd82a02bf76d6ea0458040517b761d20f /engine/lib/input.php
parent1ddb05d873cc0b5c03bdfad9ff27a29babc03e85 (diff)
downloadelgg-659f6376ca5e0d184585ef40dfc2e3c5256e4f17.tar.gz
elgg-659f6376ca5e0d184585ef40dfc2e3c5256e4f17.tar.bz2
Exception handling
git-svn-id: https://code.elgg.org/elgg/trunk@25 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/input.php')
-rw-r--r--engine/lib/input.php16
1 files changed, 8 insertions, 8 deletions
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