]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge pull request #3465 from wallabag/fix-tests
authorJérémy Benoist <j0k3r@users.noreply.github.com>
Sun, 10 Dec 2017 12:33:23 +0000 (13:33 +0100)
committerGitHub <noreply@github.com>
Sun, 10 Dec 2017 12:33:23 +0000 (13:33 +0100)
Fix bad key matching

src/Wallabag/ApiBundle/Controller/UserRestController.php

index a1378fc54e35e522259a71ee1d190d66cc6a175f..3a4dafcd083887e92923e0e23f30adef50292834 100644 (file)
@@ -77,7 +77,7 @@ class UserRestController extends WallabagRestController
             $view->setFormat('json');
 
             // handle errors in a more beautiful way than the default view
-            $data = json_decode($this->handleView($view)->getContent(), true)['children'];
+            $data = json_decode($this->handleView($view)->getContent(), true)['errors']['children'];
             $errors = [];
 
             if (isset($data['username']['errors'])) {