Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
G17 Media Posted October 11, 2022 Posted October 11, 2022 (edited) Hello guys, Apologies if I'm missing something, but I've just ran into an issue upgrading one of our forums to PHP8. We make use of theme hooks which override theme functions and call the parent when necessary. With our upgrade to PHP8 without IN_DEV, this all stopped working, presenting errors like: Cannot use "parent" when current class scope has no parent (at ./system/Theme/Theme.php line 2703). As far as I can tell by looking at the code in ./system/Theme/Theme.php, I cannot see how calling parent classes would work in that eval statement, as I think a parent call inside a class function in PHP8 without a parent will cause the eval to fail with a fatal error. But this is what IPS is doing. Have I massively overlooked something here or is this behavior expected? The code works fine with PHP 7.4.X, as well as in IN_DEV mode, as the templates are not compiled in the same manner. Thanks! Edited October 11, 2022 by G17 Media
G17 Media Posted October 11, 2022 Author Posted October 11, 2022 1 minute ago, Adriano Faria said: Thank you very much! I do not understand the design decision from IPS here hopefully they fix this or at least mention this in their documentation at some point.
Recommended Posts