mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +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);
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue