function __construct($user=null)
{
- $this->scoped = $user->getProfile();
+ $this->scoped = empty($user)?null:$user->getProfile();
$this->user = $user;
}
// Give plugins a chance to add or override...
Event::handle('HelpCommandMessages', array($this, &$commands));
- sort($commands);
+ ksort($commands);
foreach ($commands as $command => $help) {
$out[] = "$command - $help";
}