Reply to thread

[CODE]ErrorException {▼

  #message: "[E_NOTICE] Undefined index: enablePush"

  #code: 0

  #file: "src/XF.php"

  #line: 566

  #severity: E_NOTICE

  trace: {▶}

}[/CODE]


This PHP error triggers the XF\Error::displayFatalExceptionMessage error path (which just outputs a "site_currently_being_upgraded" phrase on an otherwise empty page) instead of showing a more user-friendly error page.


Possible fix:

[CODE=diff]

--- a/src/XF.php

+++ b/src/XF.php

@@ -562,7 +562,9 @@ class XF

      */

     public static function isPushUsable()

     {

-        if (!self::options()->enablePush)

+        $options = self::options();

+

+        if (!isset($options->enablePush) || !$options->enablePush)

         {

             return false;

         }

[/CODE]


Back
Top Bottom