mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00:55 +01:00
Fix an issue with non-integer custom keys in Lisk.
This commit is contained in:
parent
bed2120b86
commit
330182f195
1 changed files with 3 additions and 2 deletions
|
@ -741,12 +741,13 @@ abstract class LiskDAO {
|
||||||
}
|
}
|
||||||
$this->setVersion($this->getVersion() + 1);
|
$this->setVersion($this->getVersion() + 1);
|
||||||
} else {
|
} else {
|
||||||
|
$id = $this->getID();
|
||||||
$conn->query(
|
$conn->query(
|
||||||
'UPDATE %T SET %Q WHERE %C = %d',
|
'UPDATE %T SET %Q WHERE %C = '.(is_int($id) ? '%d' : '%s'),
|
||||||
$this->getTableName(),
|
$this->getTableName(),
|
||||||
$map,
|
$map,
|
||||||
$this->getIDKeyForUse(),
|
$this->getIDKeyForUse(),
|
||||||
$this->getID());
|
$id);
|
||||||
// We can't detect a missing object because updating an object without
|
// We can't detect a missing object because updating an object without
|
||||||
// changing any values doesn't affect rows. We could jiggle timestamps
|
// changing any values doesn't affect rows. We could jiggle timestamps
|
||||||
// to catch this for objects which track them if we wanted.
|
// to catch this for objects which track them if we wanted.
|
||||||
|
|
Loading…
Reference in a new issue