@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | */ |
| 113 | 113 | public static function header($name, $default = null) |
| 114 | 114 | { |
| 115 | - return self::getInstance()->getHeader($name, $default); |
|
| 115 | + return self::getInstance()->getHeader($name, $default); |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | /** |
@@ -125,10 +125,10 @@ discard block |
||
| 125 | 125 | $header = null; |
| 126 | 126 | if ($this->hasHeader($name)) { |
| 127 | 127 | $header = $this->header[$name]; |
| 128 | - } else if(array_key_exists('h_' . strtolower($name), $this->query)) { |
|
| 129 | - $header = $this->query['h_' . strtolower($name)]; |
|
| 130 | - } else if(array_key_exists('HTTP_' . strtoupper(str_replace('-', '_', $name)), $this->server)) { |
|
| 131 | - $header = $this->server['HTTP_' . strtoupper(str_replace('-', '_', $name))]; |
|
| 128 | + }else if (array_key_exists('h_'.strtolower($name), $this->query)) { |
|
| 129 | + $header = $this->query['h_'.strtolower($name)]; |
|
| 130 | + }else if (array_key_exists('HTTP_'.strtoupper(str_replace('-', '_', $name)), $this->server)) { |
|
| 131 | + $header = $this->server['HTTP_'.strtoupper(str_replace('-', '_', $name))]; |
|
| 132 | 132 | } |
| 133 | 133 | return $header ?: $default; |
| 134 | 134 | } |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | { |
| 227 | 227 | if (null === $url) $url = $this->getServer('HTTP_ORIGIN'); |
| 228 | 228 | ob_start(); |
| 229 | - header('Location: ' . $url); |
|
| 229 | + header('Location: '.$url); |
|
| 230 | 230 | ob_end_clean(); |
| 231 | 231 | Security::getInstance()->updateSession(); |
| 232 | 232 | exit(_("Redireccionando...")); |
@@ -270,9 +270,9 @@ discard block |
||
| 270 | 270 | { |
| 271 | 271 | $url = $this->getServerName(); |
| 272 | 272 | $protocol = $protocol ? $this->getProtocol() : ''; |
| 273 | - if (!empty($protocol)) $url = $protocol . $url; |
|
| 273 | + if (!empty($protocol)) $url = $protocol.$url; |
|
| 274 | 274 | if (!in_array($this->getServer('SERVER_PORT'), [80, 443])) { |
| 275 | - $url .= ':' . $this->getServer('SERVER_PORT'); |
|
| 275 | + $url .= ':'.$this->getServer('SERVER_PORT'); |
|
| 276 | 276 | } |
| 277 | 277 | return $url; |
| 278 | 278 | } |