Skip to content

Commit

Permalink
BUG: get_variable for postgres never returns a value (#9710)
Browse files Browse the repository at this point in the history
Because of this, the insert_or_update() method never uses the "INSERT INTO ... ON CONFLICT DO UPDATE SET ..." command, and the logs constantly show errors adding records to the message cache due to "duplicate key".
  • Loading branch information
vel21ripn authored Nov 24, 2024
1 parent 66c1363 commit 613ccd7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion program/lib/Roundcube/db/pgsql.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,10 @@ public function get_variable($varname, $default = null)
return rcube::get_instance()->config->get('db_' . $varname, $default);
}

$this->variables[$varname] = rcube::get_instance()->config->get('db_' . $varname);
$cfgval = rcube::get_instance()->config->get('db_' . $varname);
if (isset($cfgval)) {
return $cfgval;
}

if (!isset($this->variables)) {
$this->variables = [];
Expand Down

0 comments on commit 613ccd7

Please sign in to comment.