Jump to content

Fatal error with upgrade on PHP 7.4


Recommended Posts

PHP 7.4 deprecates unparenthesised ternary operators so upgrading to the update fails with the error message:


[03-Jan-2020 07:52:50 UTC] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in //www/community/applications/core/modules/setup/upgrade/license.php on line 98
[03-Jan-2020 07:52:50 UTC] PHP Stack trace:
[03-Jan-2020 07:52:50 UTC] PHP   1. {main}() //www/community/admin/upgrade/index.php:0
[03-Jan-2020 07:52:50 UTC] PHP   2. IPS\Dispatcher\Setup->run() //www/community/admin/upgrade/index.php:34
[03-Jan-2020 07:52:50 UTC] PHP   3. class_exists() /www/community/system/Dispatcher/Setup.php:209
[03-Jan-2020 07:52:50 UTC] PHP   4. spl_autoload_call() /www/community/system/Dispatcher/Setup.php:209
[03-Jan-2020 07:52:50 UTC] PHP   5. IPS\IPS::autoloader() /www/community/system/Dispatcher/Setup.php:209

This should be an easy fix, can one be provided ASAP?

Link to comment
Share on other sites

It should only throw a E_DEPRECATED error now, which can be suppressed in php.ini. Based on the path in your error stack I'm going to assume you have access to that.


PHP will only die on errors after you change error_reporting to this.


The other option is to go back to PHP 7.3.

Link to comment
Share on other sites

  • 1 year later...
  • 7 months later...

I install php8.0 and recive error

[Fri Dec 31 17:54:04.708553 2021] [proxy_fcgi:error] [pid 15263] AH01071: Got error 'PHP message: PHP Fatal error:  Unparenthesized `a ? b : c ? d : e` is not supported. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /forum/system/Theme/Theme.php(860) : eval()'d code on line 1400'

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...