@@ -8,9 +8,10 @@ discard block |
||
8 | 8 | function getallheaders() |
9 | 9 | { |
10 | 10 | $headers = array(); |
11 | - foreach ($_SERVER as $h => $v) |
|
12 | - if (preg_match('/HTTP_(.+)/', $h, $hp)) |
|
11 | + foreach ($_SERVER as $h => $v) { |
|
12 | + if (preg_match('/HTTP_(.+)/', $h, $hp)) |
|
13 | 13 | $headers[$hp[1]] = $v; |
14 | + } |
|
14 | 15 | return $headers; |
15 | 16 | } |
16 | 17 | } |
@@ -214,7 +215,9 @@ discard block |
||
214 | 215 | */ |
215 | 216 | public function redirect($url = null) |
216 | 217 | { |
217 | - if (null === $url) $url = $this->getServer('HTTP_ORIGIN'); |
|
218 | + if (null === $url) { |
|
219 | + $url = $this->getServer('HTTP_ORIGIN'); |
|
220 | + } |
|
218 | 221 | ob_start(); |
219 | 222 | header('Location: ' . $url); |
220 | 223 | ob_end_clean(); |
@@ -261,7 +264,9 @@ discard block |
||
261 | 264 | $host = $this->getServerName(); |
262 | 265 | $protocol = $protocol ? $this->getProtocol() : ''; |
263 | 266 | $url = ''; |
264 | - if (!empty($host) && !empty($protocol)) $url = $protocol . $host; |
|
267 | + if (!empty($host) && !empty($protocol)) { |
|
268 | + $url = $protocol . $host; |
|
269 | + } |
|
265 | 270 | return $url; |
266 | 271 | } |
267 | 272 |