From 27cffdf12876899294d61de9cdc0f4f3d20d1eb4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 27 Jul 2009 20:22:30 +0000 Subject: [PATCH] Works better with null --- inc/request-functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/request-functions.php b/inc/request-functions.php index 0ae3de0a6a..bf045e11fe 100644 --- a/inc/request-functions.php +++ b/inc/request-functions.php @@ -113,7 +113,7 @@ function REQUEST_SET_GET ($element, $value) { } // Wrapper for elements in $_POST -function REQUEST_POST ($element, $subElement=-1) { +function REQUEST_POST ($element, $subElement=null) { // By default no element is there $value = null; @@ -126,7 +126,7 @@ function REQUEST_POST ($element, $subElement=-1) { $value = $GLOBALS['raw_request']['post'][$element]; // Is $subElement set? - if (($subElement != -1) && (REQUEST_ISSET_POST($element, $subElement))) { + if ((!is_null($subElement)) && (REQUEST_ISSET_POST($element, $subElement))) { // Then use this $value = SQL_ESCAPE($value[$subElement]); } elseif (!is_array($value)) { -- 2.39.5