From e56983af1f7b74993784687e7b192a898422fe7f Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 21 Jan 2016 16:36:30 +0100 Subject: Fix bad redirection when adding a new user --- src/Wallabag/CoreBundle/Controller/ConfigController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Wallabag/CoreBundle/Controller') diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index d0cf91de..6c375909 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php @@ -125,7 +125,7 @@ class ConfigController extends Controller $newUser->setEnabled(true); $newUserForm = $this->createForm(NewUserType::class, $newUser, array( 'validation_groups' => array('Profile'), - 'action' => $this->generateUrl('config').'#set5', + 'action' => $this->generateUrl('config').'#set6', )); $newUserForm->handleRequest($request); -- cgit v1.2.3 From a0d6ccc5ca0dc0082467cc65b006150aff2488c4 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 21 Jan 2016 16:37:25 +0100 Subject: Fix bad type after using findByUrlAndUserId It returns an object since few commits this part of (untested) code still use an array. Also add test for that part of code. --- src/Wallabag/CoreBundle/Controller/EntryController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Wallabag/CoreBundle/Controller') diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index 9dd904f1..3e1b512f 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php @@ -54,10 +54,10 @@ class EntryController extends Controller if (false !== $existingEntry) { $this->get('session')->getFlashBag()->add( 'notice', - 'Entry already saved on '.$existingEntry['createdAt']->format('d-m-Y') + 'Entry already saved on '.$existingEntry->getCreatedAt()->format('d-m-Y') ); - return $this->redirect($this->generateUrl('view', array('id' => $existingEntry['id']))); + return $this->redirect($this->generateUrl('view', array('id' => $existingEntry->getId()))); } $this->updateEntry($entry); -- cgit v1.2.3