]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - scripts/command.php
Merge remote-tracking branch 'upstream/master' into social-master
[quix0rs-gnu-social.git] / scripts / command.php
index 8cf44ecd2d31425d3ced4b4f1efa7e75d3083d56..5ffa5bda0de9e0611cc402d0c69da82869782828 100755 (executable)
@@ -33,7 +33,7 @@ Perform commands on behalf of a user, such as sub, unsub, join, drop
 
 END_OF_USERROLE_HELP;
 
-require_once INSTALLDIR.'/scripts/commandline.inc';
+require_once INSTALLDIR.'/scripts/commandline.inc.php';
 
 function interpretCommand($user, $body)
 {
@@ -64,8 +64,9 @@ if (have_option('i', 'id')) {
         exit(1);
     }
 } else if (have_option('o', 'owner')) {
-    $user = User::siteOwner();
-    if (empty($user)) {
+    try {
+        $user = User::siteOwner();
+    } catch (ServerException $e) {
         print "Site has no owner.\n";
         exit(1);
     }