Gazzieh Posted September 4, 2021 Share Posted September 4, 2021 I have received a plugin for a system (Moodle) and, on install, get the following error in the error logs: Quote [Sat Sep 04 15:54:28.583053 2021] [php:error] [pid 15584] [client 18.104.22.168:36044] 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 /var/www/html/moodle/blocks/mis_integrator/lib/url.php on line 19 The offending line of code is: $s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : ""; I haven't coded in PHP for a while now and have just updated the server to PHP 8.0 I cannot see what is wrong in this section; anyone have an idea? Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.