mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2026-11-20 23:43:26 +03:00
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:
1 parent
2cce49a657
commit
ae7339afd4
11 files changed
+57
-51
No files matched your search
@@ -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]);
|
||||
|
||||
|
||||
Reference in new issue
Block a user