From 4ac0e659638a4b79f1ca58b673fdc12d07bbb06b Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 8 Dec 2017 12:10:26 +0100 Subject: [PATCH] Fix bad key matching I didn't try to find which package introduced a BC (might be user-bundle or jms serializer) --- src/Wallabag/ApiBundle/Controller/UserRestController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Wallabag/ApiBundle/Controller/UserRestController.php b/src/Wallabag/ApiBundle/Controller/UserRestController.php index a1378fc5..3a4dafcd 100644 --- a/src/Wallabag/ApiBundle/Controller/UserRestController.php +++ b/src/Wallabag/ApiBundle/Controller/UserRestController.php @@ -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'])) { -- 2.41.0