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/8.1 compatibility error when activating an extension/module for a company #11

Open
rkilchmn opened this issue Dec 11, 2022 · 0 comments

Comments

@rkilchmn
Copy link

rkilchmn commented Dec 11, 2022

FA 2.4.14 using PHP 8.1.6:

When activating an extension/module for a company I get this error:
mysqli_set_charset(): Passing null to parameter #2 ($charset) of type string is deprecated in file: /usr/share/webapps/frontaccounting/includes/db/connect_db_mysqli.inc at line 298

my temporary fix:
function db_set_charset($db, $charset)
{
global $db;

if (!empty( $charset)) {  // <--------------- fix
	return mysqli_set_charset($db, $charset);
}

}

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

1 participant