Merge branch 'ent-3470-getallheaders_en_PHP_FPM' into 'develop'

PHP-FPM

See merge request artica/pandorafms!2607
This commit is contained in:
Daniel Rodriguez 2019-07-18 15:40:59 +02:00
commit fdbc3b5366
1 changed files with 24 additions and 0 deletions

View File

@ -5413,3 +5413,27 @@ function get_help_info($section_name)
// hd($result);
return $result;
}
if (!function_exists('getallheaders')) {
/**
* Fix for php-fpm
*
* @return array
*/
function getallheaders()
{
$headers = [];
foreach ($_SERVER as $name => $value) {
if (substr($name, 0, 5) == 'HTTP_') {
$headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
}
}
return $headers;
}
}