XF 2.1 "An unexpected error occurred. Please try again later." after upgrade to PHP 7.3

MatthewC

Member
Good morning.

My server was running PHP 7.0 and my Xenforo was working fine. I asked my webhost to upgrade my PHP to 7.3. They did, and it was successful. However, now when I visit my forum I get the error message of "An unexpected error occurred. Please try again later."

I honestly can't remember if I was running Xenforo 2.1 or 2.2.

Could someone please tell me how I may go about fixing this and getting my forum back up?

Thank you in advance.
 

Brogan

XenForo moderator
Staff member
You may be able to log in to the ACP directly to check the error log.

Otherwise, enable debug mode - that should give a detailed error message.
 

MatthewC

Member
Thank you for this quick and helpful reply.

Trying to access the ACP directly resulted in the same error.

Entering the debug mode provided the following feedback:


An exception occurred: [ErrorException] [E_WARNING] "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in src/XF/Language.php on line 458

  1. XF::handlePhpError() in src/vendor/composer/ClassLoader.php at line 444
  2. include() in src/vendor/composer/ClassLoader.php at line 444
  3. Composer\Autoload\includeFile() in src/vendor/composer/ClassLoader.php at line 322
  4. Composer\Autoload\ClassLoader->loadClass()
  5. spl_autoload_call() in src/XF/App.php at line 1010
  6. XF\App->XF\{closure}() in src/XF/Container.php at line 228
  7. XF\Container->create() in src/XF/App.php at line 2339
  8. XF\App->language() in src/XF.php at line 412
  9. XF::language() in src/XF/App.php at line 1466
  10. XF\App->setupTemplaterObject() in src/XF/App.php at line 1119
  11. XF\App->XF\{closure}() in src/XF/Container.php at line 28
  12. XF\Container->offsetGet() in src/XF/App.php at line 2692
  13. XF\App->templater() in src/XF/Admin/App.php at line 95
  14. XF\Admin\App->preRender() in src/XF/Mvc/Dispatcher.php at line 280
  15. XF\Mvc\Dispatcher->render() in src/XF/Mvc/Dispatcher.php at line 44
  16. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1931
  17. XF\App->run() in src/XF.php at line 329
  18. XF::runApp() in admin.php at line 13
 

MatthewC

Member
Thank you again.

I have no add-ons installed at all.

I will revert back.

Wordpress on my other sites was complaining that 7.0 was not secure. Can I go to version 7.2 instead? What is the newest version of PHP that Xenforo should work with?
 
Top