aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.inc.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-02-28 20:58:45 +0000
committerplegall <plg@piwigo.org>2010-02-28 20:58:45 +0000
commitf1f59e937a3529b6342f1f23c7dda598d379e643 (patch)
tree1068f03cecf8781933608ff2765e9c3b839b2b4f /include/functions.inc.php
parentd2872aacef1557557c9997befd1d3af085083c36 (diff)
improvement: avoid the use of @ instead of a real test
git-svn-id: http://piwigo.org/svn/branches/2.0@5003 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions.inc.php')
-rw-r--r--include/functions.inc.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index 02a783854..5b594a512 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -1503,14 +1503,20 @@ function get_comment_post_key($image_id)
* pattern. This should happen only during hacking attempts.
*
* @param string param_name
- * @param mixed param_value
+ * @param array param_array
* @param boolean is_array
* @param string pattern
*
* @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))
{