mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-13 02:28:41 +00:00
Add try/catch to find hr invalid bytecode escaping
This commit is contained in:
parent
e8ecfce4fd
commit
23fe8d2124
|
|
@ -21,6 +21,7 @@ use phpOMS\DataStorage\Database\Query\QueryType;
|
|||
use phpOMS\DataStorage\DataMapperInterface;
|
||||
use phpOMS\Message\RequestAbstract;
|
||||
use phpOMS\Utils\ArrayUtils;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
* Datamapper for databases.
|
||||
|
|
@ -485,7 +486,14 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
$query->insert(static::$primaryField)->value(0);
|
||||
}
|
||||
|
||||
try {
|
||||
self::$db->con->prepare($query->toSql())->execute();
|
||||
} catch (Throwable $t) {
|
||||
// @todo: remove after debugging
|
||||
// @fix: really remove it
|
||||
// @critical: after we found the bug we MUST remove it!
|
||||
var_dump($query->toSql());
|
||||
}
|
||||
|
||||
return self::$db->con->lastInsertId();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user