Skip to content

Commit

Permalink
One liner. Dont call function parseAccept() twice in RequestHandlerCo…
Browse files Browse the repository at this point in the history
…mponent.
  • Loading branch information
sgpinkus committed Feb 20, 2014
1 parent a80cbc2 commit 62cb733
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/RequestHandlerComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ protected function _setExtension() {
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;
Expand Down

0 comments on commit 62cb733

Please sign in to comment.