This commit is contained in:
Daniel Barbero Martin 2019-07-17 17:20:09 +02:00
parent 8ce685a219
commit 7fa95d3e43
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;
}
}