Index: branches/2.0/admin/cat_list.php
===================================================================
--- branches/2.0/admin/cat_list.php	(revision 5001)
+++ branches/2.0/admin/cat_list.php	(revision 5003)
@@ -70,5 +70,5 @@
 // +-----------------------------------------------------------------------+
 
-check_input_parameter('parent_id', @$_GET['parent_id'], false, PATTERN_ID);
+check_input_parameter('parent_id', $_GET, false, PATTERN_ID);
 
 $categories = array();
Index: branches/2.0/admin/element_set.php
===================================================================
--- branches/2.0/admin/element_set.php	(revision 5001)
+++ branches/2.0/admin/element_set.php	(revision 5003)
@@ -40,5 +40,5 @@
 check_status(ACCESS_ADMINISTRATOR);
 
-check_input_parameter('selection', @$_POST['selection'], true, PATTERN_ID);
+check_input_parameter('selection', $_POST, true, PATTERN_ID);
 
 // +-----------------------------------------------------------------------+
Index: branches/2.0/admin/element_set_global.php
===================================================================
--- branches/2.0/admin/element_set_global.php	(revision 5001)
+++ branches/2.0/admin/element_set_global.php	(revision 5003)
@@ -45,8 +45,8 @@
 
 // the $_POST['selection'] was already checked in element_set.php
-check_input_parameter('add_tags', @$_POST['add_tags'], true, PATTERN_ID);
-check_input_parameter('del_tags', @$_POST['del_tags'], true, PATTERN_ID);
-check_input_parameter('associate', @$_POST['associate'], false, PATTERN_ID);
-check_input_parameter('dissociate', @$_POST['dissociate'], false, PATTERN_ID);
+check_input_parameter('add_tags', $_POST, true, PATTERN_ID);
+check_input_parameter('del_tags', $_POST, true, PATTERN_ID);
+check_input_parameter('associate', $_POST, false, PATTERN_ID);
+check_input_parameter('dissociate', $_POST, false, PATTERN_ID);
 
 if (isset($_POST['delete']))
Index: branches/2.0/admin/picture_modify.php
===================================================================
--- branches/2.0/admin/picture_modify.php	(revision 5001)
+++ branches/2.0/admin/picture_modify.php	(revision 5003)
@@ -34,6 +34,6 @@
 check_status(ACCESS_ADMINISTRATOR);
 
-check_input_parameter('image_id', $_GET['image_id'], false, PATTERN_ID);
-check_input_parameter('cat_id', @$_GET['cat_id'], false, PATTERN_ID);
+check_input_parameter('image_id', $_GET, false, PATTERN_ID);
+check_input_parameter('cat_id', $_GET, false, PATTERN_ID);
 
 // +-----------------------------------------------------------------------+
Index: branches/2.0/comments.php
===================================================================
--- branches/2.0/comments.php	(revision 5001)
+++ branches/2.0/comments.php	(revision 5003)
@@ -118,5 +118,5 @@
 if (!empty($_GET['comment_id']))
 {
-  check_input_parameter('comment_id', $_GET['comment_id'], false, PATTERN_ID);
+  check_input_parameter('comment_id', $_GET, false, PATTERN_ID);
 
   // currently, the $_GET['comment_id'] is only used by admins from email
@@ -184,5 +184,5 @@
     if (isset($_GET['delete']))
     {
-      check_input_parameter('delete', $_GET['delete'], false, PATTERN_ID);
+      check_input_parameter('delete', $_GET, false, PATTERN_ID);
       
       $query = '
@@ -196,5 +196,5 @@
     if (isset($_GET['validate']))
     {
-      check_input_parameter('validate', $_GET['validate'], false, PATTERN_ID);
+      check_input_parameter('validate', $_GET, false, PATTERN_ID);
       
       $query = '
Index: branches/2.0/feed.php
===================================================================
--- branches/2.0/feed.php	(revision 5001)
+++ branches/2.0/feed.php	(revision 5003)
@@ -64,5 +64,5 @@
 // +-----------------------------------------------------------------------+
 
-check_input_parameter('feed', @$_GET['feed'], false, '/^[0-9a-z]{50}$/i');
+check_input_parameter('feed', $_GET, false, '/^[0-9a-z]{50}$/i');
 
 $feed_id= isset($_GET['feed']) ? $_GET['feed'] : '';
Index: branches/2.0/include/functions.inc.php
===================================================================
--- branches/2.0/include/functions.inc.php	(revision 5001)
+++ branches/2.0/include/functions.inc.php	(revision 5003)
@@ -1504,5 +1504,5 @@
  *
  * @param string param_name
- * @param mixed param_value
+ * @param array param_array
  * @param boolean is_array
  * @param string pattern
@@ -1510,6 +1510,12 @@
  * @return void
  */
-function check_input_parameter($param_name, $param_value, $is_array, $pattern)
-{
+function check_input_parameter($param_name, $param_array, $is_array, $pattern)
+{
+  $param_value = null;
+  if (isset($param_array[$param_name]))
+  {
+    $param_value = $param_array[$param_name];
+  }
+  
   // it's ok if the input parameter is null
   if (empty($param_value))
Index: branches/2.0/search.php
===================================================================
--- branches/2.0/search.php	(revision 5001)
+++ branches/2.0/search.php	(revision 5003)
@@ -72,5 +72,5 @@
   if (isset($_POST['tags']))
   {
-    check_input_parameter('tags', $_POST['tags'], true, PATTERN_ID);
+    check_input_parameter('tags', $_POST, true, PATTERN_ID);
     
     $search['fields']['tags'] = array(
@@ -93,5 +93,5 @@
   if (isset($_POST['cat']))
   {
-    check_input_parameter('cat', $_POST['cat'], true, PATTERN_ID);
+    check_input_parameter('cat', $_POST, true, PATTERN_ID);
     
     $search['fields']['cat'] = array(
