diff --git a/src/Console/Shell.php b/src/Console/Shell.php index 5a2477be2f8..c6085513431 100644 --- a/src/Console/Shell.php +++ b/src/Console/Shell.php @@ -185,7 +185,7 @@ public function __construct(ConsoleIo $io = null) } $this->_io = $io ?: new ConsoleIo(); - $this->modelFactory('Table', [$this->getTableLocator(), 'get']); + $this->modelFactory('Table', [$this->getTableLocator() ?: new TableLocator(), 'get']); $this->Tasks = new TaskRegistry($this); $this->_mergeVars(