Skip to content

Commit

Permalink
fixed referencing bug
Browse files Browse the repository at this point in the history
  • Loading branch information
maximebf committed Jan 1, 2013
1 parent 940980c commit 2665616
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ConsoleKit/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public function addCommand($callback, $alias = null, $default = false)
if (substr($name, -7) === 'Command') {
$name = substr($name, 0, -7);
}
$name = Utils::dashized(array_pop(explode('\\', $name)));
$name = Utils::dashized(basename(str_replace('\\', '/', $name)));
} else {
throw new ConsoleException("'$callback' must reference a class or a function");
}
Expand Down

0 comments on commit 2665616

Please sign in to comment.