You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Mon Nov 25 20:33:23.852016 2024] [cgi:error] [pid 853343] [client 127.0.0.1:46582] AH01215: DBD::mysql::st execute failed: Column 'Name' cannot be null at SelectEmailPrefs line 276.
[Mon Nov 25 20:44:17.505547 2024] [cgi:error] [pid 853343] [client 127.0.0.1:38512] AH01215: DBD::mysql::st execute failed: Incorrect integer value: '' for column <dbname>.EmailUser.PreferHTML at row 1 at SelectEmailPrefs line 276.
Discussion:
$Name was being blanked out at line 109 causing a null field. The problem probably surfaced due to STRICT_TRANS_TABLES being default on in 10.3.39-MariaDB . Also, I set the $HTML preference to the default value of 0 so that the row updates correctly.
Patch:
diff --git a/SelectEmailPrefs.orig b/SelectEmailPrefs
index f5f4f85..1e41a41 100755
--- a/SelectEmailPrefs.orig
+++ b/SelectEmailPrefs
@@ -270,6 +270,8 @@ if ($Mode eq "update") {
my $UpdateUserInfo = $dbh -> prepare("update EmailUser set EmailAddress=?,PreferHTML=? where EmailUserID=?");
$UpdateUserInfo -> execute($Email,$HTML,$EmailUserID);
} else {
+ my $Name = $Untaint -> extract(-as_safehtml => "name") || "";
+ if ($HTML eq "") { $HTML = 0; }
my $UpdateUserInfo = $dbh -> prepare("update EmailUser set Name=?,EmailAddress=?,PreferHTML=? where EmailUserID=?");
$UpdateUserInfo -> execute($Name,$Email,$HTML,$EmailUserID);
}
The text was updated successfully, but these errors were encountered:
Errors being addressed:
[Mon Nov 25 20:33:23.852016 2024] [cgi:error] [pid 853343] [client 127.0.0.1:46582] AH01215: DBD::mysql::st execute failed: Column 'Name' cannot be null at SelectEmailPrefs line 276.
[Mon Nov 25 20:44:17.505547 2024] [cgi:error] [pid 853343] [client 127.0.0.1:38512] AH01215: DBD::mysql::st execute failed: Incorrect integer value: '' for column
<dbname>
.EmailUser
.PreferHTML
at row 1 at SelectEmailPrefs line 276.Discussion:
$Name was being blanked out at line 109 causing a null field. The problem probably surfaced due to STRICT_TRANS_TABLES being default on in 10.3.39-MariaDB . Also, I set the $HTML preference to the default value of 0 so that the row updates correctly.
Patch:
The text was updated successfully, but these errors were encountered: