Topic: PHP 8.1 onwards db_set_charset needs second parameter

While activating an extension from php 8.1 onwards, we have an issue with

mysqli_set_charset second parameter cant be null,  This happens from db_import function from maintenance_db.inc

$encoding = null; // UI encoding for default site language is the default

With

$encoding ='utf8'; // UI encoding for default site language is the default

Or a valid $encoding needs to be passed here.

Subscription service based on FA
HRM CRM POS batch Themes

Re: PHP 8.1 onwards db_set_charset needs second parameter

Thanks @kvvaradha.

We just got this included in the new minor 2.4.15 that is releasing today.

Joe

Re: PHP 8.1 onwards db_set_charset needs second parameter

Great to see the new release from FA. We have to fix one more issue  from the gettext.inc add_domain function generates a big list of not found domain file error for /lang/C/LC_MESSAGES/C.po.  So we need to add one if condition there

  function add_domain($domain, $path = false, $version ='')
    {   
        
        if ($path === false) 

With this

  function add_domain($domain, $path = false, $version ='')
    {   
       if($domain == 'C')
        return;
        
        if ($path === false) 

The if condition prevents adding log lines of missing entries.

Subscription service based on FA
HRM CRM POS batch Themes

Re: PHP 8.1 onwards db_set_charset needs second parameter

Ok, done. Included in 2.4.15 at Sourceforge.net.

Joe