mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge pull request #2873 from sam-at-github/requesthandlercomponent-reuse-a-var
One liner. Dont call function parseAccept() twice in RequestHandlerCompo...
This commit is contained in:
commit
2289521e30
1 changed files with 1 additions and 1 deletions
|
@ -159,7 +159,7 @@ class RequestHandlerComponent extends Component {
|
|||
return;
|
||||
}
|
||||
|
||||
$accepts = $this->response->mapType($this->request->parseAccept());
|
||||
$accepts = $this->response->mapType($accept);
|
||||
$preferedTypes = current($accepts);
|
||||
if (array_intersect($preferedTypes, array('html', 'xhtml'))) {
|
||||
return null;
|
||||
|
|
Loading…
Reference in a new issue