User form "confirmed" attribute with value 0 isn't saved in version 3.6.16

Hi,

I’ve tested that if you manually change the user form field “confirmed” from “1” to “0”, the value is not saved.

In my environment (PHP 8.4), the issue seems to be here (mysqli.inc / sql_escape):

if (empty($text)) {
    return '';
}

The value of $text is "0" (string), and the empty() function evaluates it as ''.

Could this be a bug, or might there be a misconfiguration in my environment?

Thanks,
Alex

@alex.zambonin Yes that is a problem Un-confirming from Subscriber profile fails . It has been fixed in the release candidate RC2 version of 3.7.0. You can safely upgrade to that version, or patch that file

if ($text === null) {

to replace

if (empty($text)) {

Perfect… thank you Duncan!