Change ResultSet::getFirst definition

This commit is contained in:
2022-09-12 21:49:11 -03:00
parent ef1603bc4b
commit 23c56f9511

View File

@ -247,7 +247,7 @@ abstract class Repository implements RepositoryInterface
->from($this->getTable())
->where(['id = ?'])
->limit(1);
return $this->load($this->getConnection()->execute($query, [$id])->getAsArray()[0]);
return $this->load($this->getConnection()->execute($query, [$id])->getFirstAsArray());
}
public function fetchAll(): array
{