提交 9a3fc9b1 编写于 作者: weixin_47267244's avatar weixin_47267244

修复极端情况下的 Imi\Db\Drivers\Swoole\Statement->fetchColumn()

上级 0ce1bcdc
......@@ -306,14 +306,14 @@ class Statement extends BaseStatement implements IStatement
if ($row)
{
next($this->result);
}
if (isset($row[$columnKey]))
{
return $row[$columnKey];
}
elseif (is_numeric($columnKey))
{
return array_values($row)[$columnKey] ?? null;
if (isset($row[$columnKey]))
{
return $row[$columnKey];
}
elseif (is_numeric($columnKey))
{
return array_values($row)[$columnKey] ?? null;
}
}
return null;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册