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

Php 8.0 support #30

Open
JimTR opened this issue Jul 5, 2021 · 7 comments
Open

Php 8.0 support #30

JimTR opened this issue Jul 5, 2021 · 7 comments

Comments

@JimTR
Copy link

JimTR commented Jul 5, 2021

is there any plans to do a php 8 conversion ?
I have done some of the simple things like converting '{0}' to '[0]' but I am a bit stuck on admin/modules/config/threadfields.php when it creates a new record .. can not find out where the field names are read in
PHP 8 gives an error like
Warning [2] Undefined array key "hidefield" - Line: 269 - File: admin/modules/config/threadfields.php PHP 8.0.8 (Linux)

zingaburga added a commit that referenced this issue Jul 8, 2021
@zingaburga
Copy link
Owner

Looks like PHP 8 is quite brutal to this code base. Actually I'd imagine it was quite the thing for MyBB itself as many of the coding practices that was used there now generate warnings.

I've fixed a bunch of issues, but there's undoubtedly more.

@JimTR
Copy link
Author

JimTR commented Jul 10, 2021

So far everything appears to work but to date I have not tried everything, I'll post back any errors that show up later

@katjalennartz
Copy link

hey, seems like the 'mark threads as read' (as logged in user) function doesn't work any more in php8 if x thread is installed.

zingaburga added a commit that referenced this issue Jan 6, 2023
@zingaburga
Copy link
Owner

Thanks, made a fix, see if that works.

@ghost
Copy link

ghost commented Jan 6, 2023

I've got a problem with the forum status icons on index, indicating that I have unread posts without actually having unread posts. Marking a forum or all forums as read doesn't change anything. I figured it's related to your (awesome) plugin.

I fixed this by using some variables the way it's usually done in mybb: global $cache, $db, $templates instead of using $GLOBALS['cache'] and so on. I just did this in one particular function (inc/xthreads/xt_forumdhooks.php -> xthreads_global_forumbits_tpl()) since I didn't notice any other issues.
But to make this work I also had to fix some minor php 8 warnings from mybb core files, which probably will be fixed with the next update.

Idk but it works. Maybe this helps for further fixes.

@cryptic-widow
Copy link

Running PHP 8.2 on MyBB 1.8.36. Not sure if this will be of any help but I'm getting the following:
5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 802 Warning Undefined array key "fid23" 5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 802 Warning Undefined array key "fid9" 5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 802 Warning Undefined array key "fid8" 5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 802 Warning Undefined array key "fid11" 5 minutes ago inc/plugins/xt_proffields.php 803 Warning Undefined variable $html 5 minutes ago inc/plugins/xt_proffields.php 802 Warning Trying to access array offset on value of type null

@zingaburga
Copy link
Owner

I'm guessing it's an issue with https://github.com/Sama34/Additional-Settings-For-Custom-Profile-Fields

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

4 participants