From: Roland Häder Date: Mon, 27 Jul 2009 20:22:30 +0000 (+0000) Subject: Works better with null X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=27cffdf12876899294d61de9cdc0f4f3d20d1eb4 Works better with null --- 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)) {