Jump to content

PHP 8 Causing Errors


Clint Davis

Recommended Posts

I have a fully patched v4.7.0 running. I switched my server from PHP 7.4 to 8.0. When I did that, there was a 500 error in the browser. When I looked at the server logs, I saw the following repeated several times:

[27-Jul-2022 15:07:10 UTC] 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 /home/realtree/forums.realtree.com/public_html/system/Theme/Theme.php(885) : eval()'d code on line 525

I have another fully patched v4.7.0 running on the same server. That site had no issues when I switched to PHP 8.0. Is this some type of theme problem? I compared the Theme.php file in both sites, and they're identical.

Link to comment
Share on other sites

  • 2 months later...

So, I upgraded to 4.7.3 this morning and tried the switch to PHP 8.0 again. This time I'm getting a different error. Can you confirm this is related to a theme? Maybe a global template?

[19-Oct-2022 13:39:35 UTC] 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 /home/realtree/forums.realtree.com/public_html/uploads/template_1_ad9ae6e9ced8695954ac11f917afdfac_global.php on line 526

The PHP8 Compatibility Scanner on the support page isn't showing any issues. Any suggestions for my developer to troubleshoot this?

Link to comment
Share on other sites

2 minutes ago, Clint Davis said:

So, I upgraded to 4.7.3 this morning and tried the switch to PHP 8.0 again. This time I'm getting a different error. Can you confirm this is related to a theme? Maybe a global template?

[19-Oct-2022 13:39:35 UTC] 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 /home/realtree/forums.realtree.com/public_html/uploads/template_1_ad9ae6e9ced8695954ac11f917afdfac_global.php on line 526

The PHP8 Compatibility Scanner on the support page isn't showing any issues. Any suggestions for my developer to troubleshoot this?

Yes, this shows that your theme is out of date and needs to be updated to include template changes that were introduced in newer versions.

Have a look at this guide, the second part "Comparing within the AdminCP" will be the most useful since you may not know which version your theme was originally created in.

 

Link to comment
Share on other sites

We would need to look further into this for you, however the access details on file appear to be incorrect or missing. Could you please update these details by visiting your client area, selecting the relevant purchase, then clicking "Review/Update Access Information" under the "Stored Access Information" section. 

We look forward to further assisting you. 

 

Link to comment
Share on other sites

  • 2 weeks later...
11 hours ago, Cach Doan said:

Can you clarify how do you fix this issue?

Im not sure I understand what question you are asking there, as what you quoted is what they did there. They created a new theme in the admin CP, then reapplied any customisations they had.

To clarify, this will have resolved the issue, as there will have been changes in the theme that were breaking changes in PHP8

Link to comment
Share on other sites

On 10/20/2022 at 10:36 AM, Clint Davis said:

I think we've resolved the issue. We created a new theme and applied our customizations to the templates once more. Seems to be working.

Same type of issues on my side. I suspect the new version of IPB that hides some css files is not showing a few we edited.  I may go the same route as you to start clean.  

Link to comment
Share on other sites

20 minutes ago, Fast Lane! said:

Same type of issues on my side. I suspect the new version of IPB that hides some css files is not showing a few we edited.  I may go the same route as you to start clean.  

As mentioned on the other ticket you have. We would need to know which theme, and we can take a look for you

Link to comment
Share on other sites

  • 2 months later...
  • Recently Browsing   0 members

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