Fix missing debug info when COUNT(*) query fails

This commit is contained in:
Kijin Sung 2024-10-08 17:36:23 +09:00
parent b318e70fdf
commit 8540140f51

View file

@ -463,7 +463,9 @@ class DB
if ($this->isError())
{
return $this->getError();
$output = $this->getError();
$output->add('_count', $query_string);
return $output;
}
else
{
@ -474,11 +476,13 @@ class DB
catch (Exceptions\DBError $e)
{
$output = $this->setError(-1, $e->getMessage());
$output->add('_count', $query_string);
return $output;
}
catch (\PDOException $e)
{
$output = $this->setError(-1, $e->getMessage());
$output->add('_count', $query_string);
return $output;
}