Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted October 11, 20222 yr 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, 20222 yr by G17 Media
October 11, 20222 yr Author 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.