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.

This commit is contained in:
David Yell 2014-07-18 11:28:41 +01:00 committed by David Yell
parent b6eb5624f8
commit 28ec1c40a5

View file

@ -188,6 +188,7 @@ class ControllerTask extends BakeTask {
if (strtolower($wannaUseSession) === 'y') { if (strtolower($wannaUseSession) === 'y') {
array_push($components, 'Session'); array_push($components, 'Session');
} }
array_unique($components);
} }
} else { } else {
list($wannaBakeCrud, $wannaBakeAdminCrud) = $this->_askAboutMethods(); list($wannaBakeCrud, $wannaBakeAdminCrud) = $this->_askAboutMethods();