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

not working working with php 8. #122

Open
bob0bob opened this issue Nov 24, 2023 · 2 comments
Open

not working working with php 8. #122

bob0bob opened this issue Nov 24, 2023 · 2 comments

Comments

@bob0bob
Copy link

bob0bob commented Nov 24, 2023

When trying to use php 8, I get the following error. The backend appears to work, for what I use it does. The front end if completely broke.

Fatal error: Uncaught Error: Object of class WidgetContainer could not be converted to string in /home/mysticland/public_html/arx/inc/skins/skin.funcs.php:3198 Stack trace: #0 /home/mysticland/public_html/arx/inc/skins/skin.funcs.php(3198): str_replace('$wico_class$', 'evo_container...', Array) #1 /home/mysticland/public_html/arx/inc/skins/model/_skin.class.php(440): widget_container_customize_params(Array, 'right_navigatio...', 'Right Navigatio...') #2 /home/mysticland/public_html/arx/inc/skins/_skin.funcs.php(3092): Skin->container('Right Navigatio...', Array, 'right_navigatio...') #3 /home/mysticland/public_html/arx/skins/bootstrap_site_dropdown_skin/_site_body_header.inc.php(190): widget_container('right_navigatio...', Array) #4 /home/mysticland/public_html/arx/inc/skins/_skin.funcs.php(2469): require('/home/mysticlan...') #5 /home/mysticland/public_html/arx/skins/bootstrap_blog_skin/index.main.php(36): siteskin_include('_site_body_head...') #6 /home/mysticland/public_html/arx/inc/_blog_main.inc.php(1203): require('/home/mysticlan...') #7 /home/mysticland/public_html/arx/index.php(74): require('/home/mysticlan...') #8 {main} thrown in /home/mysticland/public_html/arx/inc/skins/_skin.funcs.php on line 3198

@keithbowes
Copy link
Contributor

There are a lot of these errors. Each new version of PHP breaks something (I try to fix them in my fork but I gave up on upstream years ago (version 7 looked like it was going to exarcerbate the bloat that had existed for a while, so I forked version 6.9.7 in hopes to slim it down)), but I can't really fault PHP: a lot of dubious coding practices were used and PHP was right for removing support for them (but wrong for supporting them in the first place).

@spooxe
Copy link

spooxe commented Feb 12, 2024

You can fix this with data casting in the widget class. The objects are WidgetContainer, Commentlist, ItemList and Item. Then the str_replace for $params work fine. Type cast them after the str_replace back to objects. Other solution is to to copy this objects and delete the original. After the str_replace add them back and delete the clone. But there are a also lot of more deprecations with dynamic properties....

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

3 participants