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
Fixes PHP 8 compatibility issues. #4613
Conversation
yuliu
commented
Dec 17, 2022
- The issue for tracking: Fix PHP 8 compatibility issues since version 1.8.31 #4593.
- The message of each commit explains what it fixes (the PHP 8 compatibility issue).
- The PR includes fixes for issues reported in undefined variable $usersbrowsing in eval()'d code (92) in ./showthread.php(1617). #4602.
- The PR includes fixes for some issues reported in Mark forum read doesn't work with php 8.0 #4530 (comment) . This one may be closed when the PR is merged, since other issues reported in it can't be reproduced.
- The PR doesn't fix all remaining PHP 8 compatibility issues. That means there are still more.
- Some more commits will be pushed later, before marking the PR as ready.
…/showthread.php(1617).
…hread.php` and `forumdisplay.php`, reported in mybb#4530 (comment) .
…ivate.php`(1812).
…ewthread.php` (1093).
…ull in `usercp.php` (L3643).
…ray key 0 in `inc/class_parser.php` (L1494, L1587).
- Delayed moderation: - Undefined variable `$thread` in `moderation.php` (L423). - Trying to access array offset on value of type null in `moderation.php` (L423). - Soft delete thread(s): - Undefined array key "num_threads" in `inc/class_moderation.php` (L3798). - Undefined array key "num_threads" in `inc/class_moderation.php` (L3798). - Restore (soft-deleted) thread(s): - Undefined array key "num_threads" in `inc/class_moderation.php` (L3639). - Undefined array key "num_threads" in `inc/class_moderation.php` (L3639). - Move post(s): - Undefined variable `$return_url` in eval()'d code (L27) in `moderation.php` (L2669). - Moving post(s): - Undefined array key 1 in `moderation.php` (L2697).
In commit 6b2fa22
Note: not sure if the variable |
- Approve thread(s): - Undefined array key XXX in `inc/class_moderation.php` (L437). - Undefined array key "num_posts" in `inc/class_moderation.php` (L437). - Undefined array key "num_threads" in `inc/class_moderation.php` (L504). - Similarly, unapprove thread(s).
…ull `polls.php` (L983).
… UTF-8 Conversion: - Undefined array key "table" in `admin/modules/tools/system_health.php` (L441). - Undefined variable `$converting_table` in `admin/modules/tools/system_health.php` (L241). - Undefined variable `$fulltext_to_create` in `admin/modules/tools/system_health.php` (L360).
…n `/admin/modules/tools/modlog.php` (L313).
…, which results in PHP fatal error of uncaught TypeError: Argument #2 ($array) must be of type array, null given in `array_key_exists()` in `/inc/datahandler.php` (L207).
Remarks in commit 64e8476
|
…efinements in `send_pm()` in `inc/functions.php` (L9027).
Will be merged into 1.8.33? |
…rify_sender()` in `inc/datahandlers/pm.php` (L149-L150), a workaround for mybb#4630 (comment) .
…orumlist.php` (L490).
- Undefined array key "pid" in `inc/datahandlers/warnings.php` (L687) when issuing a warning from user profile page, etc. - Undefined variable `$last_expired` in `warnings.php` (L238) when viewing a user's warnings for their specific post.
…php` (L1213) and a typo in `inc/datahandlers/post.php` (L1228).
Remarks for commit 128f8ea
|
Remarks for commit b153eb7
|
Since the code base is already in v1.8.33, while the PR is based on v1.8.32, it'll cost much more time to pinpoint recent reported issues. More PHP 8 compatibility issues will be addressed in other PRs, and this one is marked as ready for review. |
More issues relating to the video mycode parsing have been reported in https://community.mybb.com/thread-237617.html . I'll push some commits that'll cover these issues later, to this PR. |
…ibility issues.
Remarks for commit d0af363
|