From 28ec1c40a55a1b4b5f613040357286f24e698d8e Mon Sep 17 00:00:00 2001 From: David Yell Date: Fri, 18 Jul 2014 11:28:41 +0100 Subject: [PATCH] When specifying Session as a component and using Session flash messages, you end up with 'Paginator, Session, Session' which doesn't make sense. Added an array_unique to remove any duplicated components. --- lib/Cake/Console/Command/Task/ControllerTask.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Cake/Console/Command/Task/ControllerTask.php b/lib/Cake/Console/Command/Task/ControllerTask.php index 5ed17d176..86ed4737c 100644 --- a/lib/Cake/Console/Command/Task/ControllerTask.php +++ b/lib/Cake/Console/Command/Task/ControllerTask.php @@ -188,6 +188,7 @@ class ControllerTask extends BakeTask { if (strtolower($wannaUseSession) === 'y') { array_push($components, 'Session'); } + array_unique($components); } } else { list($wannaBakeCrud, $wannaBakeAdminCrud) = $this->_askAboutMethods();