]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Controller/WallabagRestController.php
Merge pull request #1070 from wallabag/v2-api-tests
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Controller / WallabagRestController.php
index fcd212efb4507a4383bc41d1e7edcb97ee0a511c..e9cd8c93922da75efa0d4b93f0e6822d85d7dc21 100644 (file)
@@ -20,7 +20,7 @@ class WallabagRestController extends Controller
      *          {"name"="username", "dataType"="string", "required"=true, "description"="username"}
      *       }
      * )
-     * @return string
+     * @return array
      */
     public function getSaltAction($username)
     {
@@ -33,7 +33,7 @@ class WallabagRestController extends Controller
             throw $this->createNotFoundException();
         }
 
-        return array($user->getSalt());
+        return array($user->getSalt() ?: null);
     }
     /**
      * Retrieve all entries. It could be filtered by many options.