[Pkg-owncloud-commits] [owncloud-doc] 14/110: Pass the HTTP status code directly in the constructor

David Prévot taffit at moszumanska.debian.org
Fri Feb 6 21:10:23 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud-doc.

commit 633b3a54a1e05c63e4075dd1b21c4b424268eacd
Author: Olivier Paroz <oparoz at users.noreply.github.com>
Date:   Fri Dec 12 22:06:50 2014 +0100

    Pass the HTTP status code directly in the constructor
    
    My IDE is telling me this way of doing things doesn't not work
    ```
    return new JSONResponse()->setStatus(Http::STATUS_NOT_FOUND);
    ```
---
 developer_manual/app/controllers.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/developer_manual/app/controllers.rst b/developer_manual/app/controllers.rst
index da07754..583b319 100644
--- a/developer_manual/app/controllers.rst
+++ b/developer_manual/app/controllers.rst
@@ -469,7 +469,7 @@ Each response subclass has access to the **setStatus** method which lets you set
                 // try to get author with $id
 
             } catch (NotFoundException $ex) {
-                return new JSONResponse()->setStatus(Http::STATUS_NOT_FOUND);
+                return new JSONResponse(array(), Http::STATUS_NOT_FOUND);
             }
         }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-doc.git



More information about the Pkg-owncloud-commits mailing list