]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Fix bad key matching 3465/head
authorJeremy Benoist <jeremy.benoist@gmail.com>
Fri, 8 Dec 2017 11:10:26 +0000 (12:10 +0100)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Fri, 8 Dec 2017 11:10:28 +0000 (12:10 +0100)
I didn't try to find which package introduced a BC (might be user-bundle
or jms serializer)

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'])) {