Merge pull request #3381 from planardothum/shell-requires-cli

Add check to abort if $argv is undefined.
This commit is contained in:
Mark Story 2014-04-24 12:32:54 -04:00
commit 00be120e7a

View file

@ -323,6 +323,7 @@ class ShellDispatcher {
protected function _parsePaths($args) {
$parsed = array();
$keys = array('-working', '--working', '-app', '--app', '-root', '--root');
$args = (array)$args;
foreach ($keys as $key) {
while (($index = array_search($key, $args)) !== false) {
$keyname = str_replace('-', '', $key);