Merge branch 'master' of repos.thedevstack.de:user/tristan/thedevstack-php-commons
This commit is contained in:
commit
c906747e7a
1 changed files with 6 additions and 6 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue