Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sermon feed broken due to nested ternary operatory ? #299

Open
tstephen opened this issue Oct 16, 2022 · 0 comments
Open

Sermon feed broken due to nested ternary operatory ? #299

tstephen opened this issue Oct 16, 2022 · 0 comments

Comments

@tstephen
Copy link
Contributor

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 &amp;rsaquo; Error</title>
<message>
&lt;p&gt;There has been a critical error on this website.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://wordpress.org/support/article/faq-troubleshooting/&quot;&gt;Learn more about troubleshooting WordPress.&lt;/a&gt;&lt;/p&gt;
</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

  1. Run sermon manager under PHP 8
  2. Visit sermon feed
  3. Boom!

Platform

Sermon Manager Version: 2.16.9
WordPress Version: 6.0.2
PHP Version: 8.0.24

Any Additional Info

PR to follow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant