]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/command.php
Merge branch 'nightly' into 'nightly'
[quix0rs-gnu-social.git] / lib / command.php
index 94e95f0ee993c96db83188d32226caefa08e3d32..b91020be7b52c6b0a83292a4263cd1acf7553c1b 100644 (file)
@@ -28,7 +28,7 @@ class Command
 
     function __construct($user=null)
     {
-        $this->scoped = $user->getProfile();
+        $this->scoped = empty($user)?null:$user->getProfile();
         $this->user = $user;
     }
 
@@ -932,7 +932,7 @@ class HelpCommand extends Command
         // 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";
         }