mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 04:24:14 +09:00
Set $output->data to NULL if query returns no rows
This commit is contained in:
parent
800f323b9c
commit
9dc8476f5d
1 changed files with 2 additions and 2 deletions
|
|
@ -538,9 +538,9 @@ class DB
|
||||||
throw new Exceptions\DBError($e->getMessage(), 0, $e);
|
throw new Exceptions\DBError($e->getMessage(), 0, $e);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result_type === 'auto' && $last_index === 0 && count($result) === 1)
|
if ($result_type === 'auto' && $last_index === 0 && count($result) <= 1)
|
||||||
{
|
{
|
||||||
return $result[0];
|
return isset($result[0]) ? $result[0] : null;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue