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…
Reference in New Issue