]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - index.php
Added type-hints for StartInitializeRouter hooks.
[quix0rs-gnu-social.git] / index.php
index 674099e7128c1193547cf1fe689a1e6032e0eb50..c68e8836fdb97bf1e37d772f889b7f97d7512181 100644 (file)
--- a/index.php
+++ b/index.php
@@ -37,6 +37,9 @@
  * @license  GNU Affero General Public License http://www.gnu.org/licenses/
  */
 
+// Comment in if you have xdebug installed and need a detailed backtrace:
+//xdebug_start_trace();
+
 $_startTime = microtime(true);
 $_perfCounters = array();
 
@@ -265,7 +268,7 @@ function main()
     $site_ssl = common_config('site', 'ssl');
 
     // If the request is HTTP and it should be HTTPS...
-    if ($site_ssl != 'never' && !StatusNet::isHTTPS() && common_is_sensitive($args['action'])) {
+    if ($site_ssl != 'never' && !GNUsocial::isHTTPS() && common_is_sensitive($args['action'])) {
         common_redirect(common_local_url($args['action'], $args));
     }
 
@@ -314,14 +317,14 @@ function main()
     } else {
         try {
             call_user_func("$action_class::run", $args);
-        } catch (ClientException $cex) {
-            $cac = new ClientErrorAction($cex->getMessage(), $cex->getCode());
+        } catch (ClientException $e) {
+            $cac = new ClientErrorAction($e->getMessage(), $e->getCode());
             $cac->showPage();
-        } catch (ServerException $sex) { // snort snort guffaw
-            $sac = new ServerErrorAction($sex->getMessage(), $sex->getCode(), $sex);
+        } catch (ServerException $e) { // snort snort guffaw
+            $sac = new ServerErrorAction($e->getMessage(), $e->getCode(), $e);
             $sac->showPage();
-        } catch (Exception $ex) {
-            $sac = new ServerErrorAction($ex->getMessage(), 500, $ex);
+        } catch (Exception $e) {
+            $sac = new ServerErrorAction($e->getMessage(), 500, $e);
             $sac->showPage();
         }
     }