Fix bad key matching

I didn't try to find which package introduced a BC (might be user-bundle
or jms serializer)
This commit is contained in:
Jeremy Benoist 2017-12-08 12:10:26 +01:00
parent e99be2c134
commit 4ac0e65963
No known key found for this signature in database
GPG Key ID: BCA73962457ACC3C

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