Expected Behaviour
RSS sermon feed to be successfully served and valid.
Actual Behaviour
When I visit the feed url it returns:
<error>
<code>internal_server_error</code>
<title>WordPress &rsaquo; Error</title>
<message>
<p>There has been a critical error on this website.</p><p><a href="https://wordpress.org/support/article/faq-troubleshooting/">Learn more about troubleshooting WordPress.</a></p>
</message>
<data>
<status>500</status>
</data>
</error>
Simultaneously this error appears in the log:
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 /wp-content/plugins/sermon-manager-for-wordpress/views/wpfc-podcast-feed.php on line 165
As you can see in the latest code that line does not have the expected parentheses.
Judging by this WordPress support request this is a new feature of PHP 7.4. We are currently running:
PHP 8.0.24 (cli) (built: Sep 29 2022 14:56:00) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.24, Copyright (c) Zend Technologies
Steps To Reproduce
- Run sermon manager under PHP 8
- Visit sermon feed
- Boom!
Platform
Sermon Manager Version: 2.16.9
WordPress Version: 6.0.2
PHP Version: 8.0.24
Any Additional Info
PR to follow.
Expected Behaviour
RSS sermon feed to be successfully served and valid.
Actual Behaviour
When I visit the feed url it returns:
Simultaneously this error appears in the log:
As you can see in the latest code that line does not have the expected parentheses.
Judging by this WordPress support request this is a new feature of PHP 7.4. We are currently running:
Steps To Reproduce
Platform
Sermon Manager Version: 2.16.9
WordPress Version: 6.0.2
PHP Version: 8.0.24
Any Additional Info
PR to follow.