mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Improve code style
This commit is contained in:
parent
261a99c0e3
commit
509accc421
2 changed files with 4 additions and 5 deletions
|
@ -271,8 +271,10 @@ class RequestHandlerComponent extends Component {
|
||||||
}
|
}
|
||||||
if (!empty($status)) {
|
if (!empty($status)) {
|
||||||
$statusCode = $this->response->httpCodes($status);
|
$statusCode = $this->response->httpCodes($status);
|
||||||
$code = key($statusCode);
|
if (is_array($statusCode)) {
|
||||||
$this->response->statusCode($code);
|
$code = key($statusCode);
|
||||||
|
$this->response->statusCode($code);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$this->response->body($this->requestAction($url, array('return', 'bare' => false)));
|
$this->response->body($this->requestAction($url, array('return', 'bare' => false)));
|
||||||
$this->response->send();
|
$this->response->send();
|
||||||
|
|
|
@ -1318,9 +1318,6 @@ class CakeResponse {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$original = $domain;
|
$original = $domain;
|
||||||
if (strpos($domain, '://') === false) {
|
|
||||||
$preg = ($requestIsSSL ? 'https://' : 'http://') . $domain;
|
|
||||||
}
|
|
||||||
$preg = '@' . str_replace('*', '.*', $domain) . '@';
|
$preg = '@' . str_replace('*', '.*', $domain) . '@';
|
||||||
$result[] = compact('original', 'preg');
|
$result[] = compact('original', 'preg');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue