Skip to content

Commit

Permalink
Fix content negotiation error
Browse files Browse the repository at this point in the history
  • Loading branch information
ojhaujjwal committed Oct 27, 2014
1 parent 1197be0 commit 16c7714
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Controller/ProfileImageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function uploadAction()
['application/json', 'text/html']
);
if ($this->profileImageService->storeImage($user, $request->getFiles()->toArray())) {
if ($format === 'application/json') {
if ($format->getValue() === 'application/json') {
return new Model\JsonModel([
'uploaded' => true
]);
Expand All @@ -73,7 +73,7 @@ public function uploadAction()
$response = $this->getResponse();
/** @var \Zend\Http\Response $response */
$response->setStatusCode(400);
if ($format === 'application/json') {
if ($format->getValue() === 'application/json') {
return new Model\JsonModel([
'error' => true,
'messages' => $form->getMessages()
Expand Down

0 comments on commit 16c7714

Please sign in to comment.