mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-24 14:24:42 +02:00
DbObject: Add pg escape for checksum
This commit is contained in:
parent
06935c442d
commit
2dcd1c2d78
@ -554,6 +554,14 @@ abstract class DbObject
|
||||
if ($this->autoincKeyName !== null) {
|
||||
unset($properties[$this->autoincKeyName]);
|
||||
}
|
||||
if ($this->connection->getDbType() === 'pgsql') {
|
||||
foreach ($properties as $key => $value) {
|
||||
if (preg_match('/checksum$/', $key)) {
|
||||
$properties[$key] = new \Zend_Db_Expr("'" . pg_escape_bytea($value) . "'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $this->db->insert($this->table, $properties);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user