Skip to content

PHP 8.0/8.1 compatibility error when activating an extension/module for a company #11

@rkilchmn

Description

@rkilchmn

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);
}

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions