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 compatibility issues #275

Open
yuliu opened this issue Nov 13, 2021 · 4 comments
Open

PHP 8.0 compatibility issues #275

yuliu opened this issue Nov 13, 2021 · 4 comments
Labels
b:1.8 Branch: 1.8.x s:in-progress Status: In Progress. Someone is already working on it
Milestone

Comments

@yuliu
Copy link
Member

yuliu commented Nov 13, 2021

This issue will track the merge system's PHP 8.0 compatibility problem. Any PR fixing any of them is welcome.

@yuliu yuliu added b:1.8 Branch: 1.8.x s:in-progress Status: In Progress. Someone is already working on it labels Nov 13, 2021
@yuliu yuliu added this to the 1.8.30 milestone Nov 13, 2021
@yuliu
Copy link
Member Author

yuliu commented Nov 13, 2021

Warning: Declaration of debugErrorHandler::error($type, $message, $file = NULL, $line = 0) should be compatible with errorHandler::error($type, $message, $file = NULL, $line = 0, $allow_output = true) in /merge/resources/class_error.php on line 34

Already reported in #273, other reports from the community forum:
https://community.mybb.com/thread-234192-post-1372839.html#pid1372839

@yuliu
Copy link
Member Author

yuliu commented Dec 17, 2021

create_function() was removed in 8.0 PHP version.

function utf8_unhtmlentities($string)
{
// Replace numeric entities
$string = preg_replace_callback('~&#x([0-9a-f]+);~i', create_function('$matches', 'return unichr(hexdec($matches[1]));'), $string);
$string = preg_replace_callback('~&#([0-9]+);~', create_function('$matches', 'return unichr($matches[1]);'), $string);
// Replace literal entities
$trans_tbl = get_html_translation_table(HTML_ENTITIES);
$trans_tbl = array_flip($trans_tbl);
return strtr($string, $trans_tbl);
}

array_walk_recursive($touserarray, create_function('&$value, $key', '$value = utf8_encode($value);'));

array_walk_recursive($touserarray, create_function('&$value, $key', '$value = utf8_encode($value);'));

array_walk_recursive($touserarray, create_function('&$value, $key', '$value = utf8_encode($value);'));

@yuliu
Copy link
Member Author

yuliu commented Dec 19, 2021

From #279 bbpress's delcaration get_group_id() isn't compatible with parent class's

BBPRESS_Converter->get_group_id():

function get_group_id($gids)

Converter->get_group_id():

function get_group_id($gids, $remove=array())

@DMiurge
Copy link

DMiurge commented Jun 8, 2024

anyone going to tackle the PHP8 incompability? PHP8 has been around for some time now. Why isn't the merge system still not working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b:1.8 Branch: 1.8.x s:in-progress Status: In Progress. Someone is already working on it
Projects
None yet
Development

No branches or pull requests

2 participants