Use PHP <= 5.3 array syntax in greader.php fix

This commit is contained in:
Anton Smirnov
2017-07-13 14:34:01 +03:00
committed by GitHub
parent 93fa066298
commit 78ca4341d1

View File

@@ -86,7 +86,7 @@ function debugInfo() {
if (function_exists('getallheaders')) {
$ALL_HEADERS = getallheaders();
} else { //nginx http://php.net/getallheaders#84262
$ALL_HEADERS = [];
$ALL_HEADERS = array();
foreach ($_SERVER as $name => $value) {
if (substr($name, 0, 5) === 'HTTP_') {
$ALL_HEADERS[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;