Jump to content

Error Upgrading to PHP 8.1 'Cannot use "parent" when current class scope'


Go to solution Solved by Simon Harvey,

Recommended Posts

Posted

When changing to PHP 8.1 in cPanel my site throws a 500 error with the following log entry:

 

[29-Nov-2022 09:39:55 UTC] PHP Fatal error:  Cannot use "parent" when current class scope has no parent in /home/xxxxxxxxxxx/public_html/forum/system/Theme/Theme.php(2632) : eval()'d code on line 27

Does anyone know how to resolve this?

Posted

That's an issue with a 3rd party application or plugin with a not PHP8.1 compatible theme hook.

Try disabling all your 3rd party applications and plugins and then enable them one by one until the error appears again to see which one is causing this.

Posted

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. 

 

  • Solution
Posted

Thanks so much for your speedy reply.

I have figured it out now - I hadn't realised that as well as the plugins on the "plugins" page I also had a third-party plugin (Mail Bouncer) that was listed on the "Applications" page - this was the one causing the error.

All sorted now.  Thanks again for such a fast response.

  • Recently Browsing   0 members

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