Skip to content

Commit

Permalink
Added code to make loading data for hasOne & belongsTo relationships …
Browse files Browse the repository at this point in the history
…to be set to an empty array when there's no matching relational data.
  • Loading branch information
rotimi committed Nov 27, 2024
1 parent aba3a14 commit f68ccf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LeanOrm/DBConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ public function getConnectionName(): string {
*
* @return mixed result of the query or false on failure or if there are no rows
*/
public function dbFetchOne(string $select_query, array $parameters = [] ) {
public function dbFetchOne(string $select_query, array $parameters = [] ): mixed {

$result = static::_execute($select_query, $parameters, true, $this->connection_name);
/** @psalm-suppress PossiblyInvalidArrayAccess */
Expand Down

0 comments on commit f68ccf7

Please sign in to comment.