DbConnection: deprecate/replace quoteBinary()
Proxies to newer code as a fix, related calls should be substituded in the long run fixes #2630
This commit is contained in:
parent
deb5b97ea0
commit
bfda96f569
|
@ -14,6 +14,9 @@ v1.10.2 (unreleased)
|
|||
### Import and Sync
|
||||
* FIX: triggering Sync manually produced an error on PostgreSQL (#2636)
|
||||
|
||||
### Internals
|
||||
* FIX: issue with empty activity log, deprecate outdated method (#2630)
|
||||
|
||||
v1.10.1
|
||||
-------
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
namespace Icinga\Module\Director\Data\Db;
|
||||
|
||||
use Icinga\Data\Db\DbConnection as IcingaDbConnection;
|
||||
use Icinga\Module\Director\Db\DbUtil;
|
||||
use RuntimeException;
|
||||
use Zend_Db_Expr;
|
||||
|
||||
|
@ -18,21 +19,14 @@ class DbConnection extends IcingaDbConnection
|
|||
return $this->getDbType() === 'pgsql';
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @param ?string $binary
|
||||
* @return Zend_Db_Expr|Zend_Db_Expr[]|null
|
||||
*/
|
||||
public function quoteBinary($binary)
|
||||
{
|
||||
if ($binary === '') {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (is_array($binary)) {
|
||||
return array_map([$this, 'quoteBinary'], $binary);
|
||||
}
|
||||
|
||||
if ($this->isPgsql()) {
|
||||
return new Zend_Db_Expr("'\\x" . bin2hex($binary) . "'");
|
||||
}
|
||||
|
||||
return new Zend_Db_Expr('0x' . bin2hex($binary));
|
||||
return DbUtil::quoteBinaryLegacy($binary, $this->getDbAdapter());
|
||||
}
|
||||
|
||||
public function binaryDbResult($value)
|
||||
|
|
Loading…
Reference in New Issue