Use native booleans for prepared SQL params; stop binding db_get_boolean() values (#1019)

Prepared statements were binding DB-specific boolean literals (`'t'/'f'`) produced by `db_get_boolean()`, which breaks PostgreSQL parameter typing in some paths (notably mailbox creation via handler flows). 

This change standardizes bound boolean parameters to native PHP `true`/`false` (which are then cast to 0/1 which seems to work fine within PDO/PostgreSQL).

fixes https://github.com/postfixadmin/postfixadmin/issues/1017
This commit is contained in:
Copilot authored and GitHub committed 2026-04-23 19:28:01 +01:00
1 parent 2cce49a657
commit ae7339afd4
11 files changed
+57 -51

No files matched your search

+1 -1
View File
@@ -22,7 +22,7 @@ define('POSTFIXADMIN_CLI', 1);
$table_vacation = table_by_key('vacation');
$active = db_get_boolean(1);
$active = true;
$vacations_that_need_deactivating = db_query_all("SELECT * FROM $table_vacation WHERE activeuntil <= NOW() AND active = :active ", ['active' => $active]);