From: Jeremy Benoist Date: Fri, 8 Dec 2017 11:10:26 +0000 (+0100) Subject: Fix bad key matching X-Git-Tag: 2.3.0~5^2 X-Git-Url: https://git.immae.eu/?p=github%2Fwallabag%2Fwallabag.git;a=commitdiff_plain;h=4ac0e659638a4b79f1ca58b673fdc12d07bbb06b Fix bad key matching I didn't try to find which package introduced a BC (might be user-bundle or jms serializer) --- 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'])) {