From 1bc9e09f2bc52368815eae9195a7eb400a1367f8 Mon Sep 17 00:00:00 2001 From: steckbrief Date: Sun, 26 Nov 2017 13:45:07 +0100 Subject: fixed some bugs in http functions --- functions.http.inc.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/functions.http.inc.php b/functions.http.inc.php index 234e404..1cdbea7 100644 --- a/functions.http.inc.php +++ b/functions.http.inc.php @@ -66,8 +66,8 @@ function setContentType($contentType) { function getHeaderExtensionValue($headerName) { $headerName = strtoupper($headerName); - if (!startsWith('HTTP_X_') { - if (!startsWith('HTTP_') { + if (!startsWith('HTTP_X_')) { + if (!startsWith('HTTP_')) { $headerName = str_replace('HTTP_', 'HTTP_X_', $headerName); } else { $headerName = 'HTTP_X_'.$headerName; @@ -79,7 +79,7 @@ function getHeaderExtensionValue($headerName) { function getHeaderValue($headerName) { $headerName = strtoupper($headerName); - if (!startsWith('HTTP_') { + if (!startsWith('HTTP_')) { $headerName = 'HTTP_'.$headerName; } @@ -99,7 +99,7 @@ function getOptionalPostParameter($parameterName, $default = NULL) { function getMandatoryPostParameter($parameterName, $message = '', $json = false) { $parameter = getPostParameter($parameterName); - return handleMandatoryParameter($parameter, $message, $json); + return handleMandatoryParameter($parameterName, $parameter, $message, $json); } function getGetParameter($parameterName) { @@ -115,7 +115,7 @@ function getOptionalGetParameter($parameterName, $default = NULL) { function getMandatoryGetParameter($parameterName, $message = '', $json = false) { $parameter = getGetParameter($parameterName); - return handleMandatoryParameter($parameter, $message, $json); + return handleMandatoryParameter($parameterName, $parameter, $message, $json); } function handleOptionalParameter($parameter, $default) { @@ -125,7 +125,7 @@ function handleOptionalParameter($parameter, $default) { return $parameter; } -function handleMandatoryParameter($parameter, $message, $json) { +function handleMandatoryParameter($parameterName, $parameter, $message, $json) { if (!isset($parameter) || is_null($parameter) || empty($parameter)) { if (empty($message)) { if ($json) { -- cgit v1.2.3