Merge branch 'master' of repos.thedevstack.de:user/tristan/thedevstack-php-commons

This commit is contained in:
steckbrief 2017-11-26 14:38:22 +01:00
commit c906747e7a

View file

@ -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) {