Merge pull request #3465 from wallabag/fix-tests

Fix bad key matching
This commit is contained in:
Jérémy Benoist 2017-12-10 13:33:23 +01:00 committed by GitHub
commit e9a4231d4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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