Skip to content

Commit

Permalink
fix: corrected return value for SQL Server results
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Oct 30, 2021
1 parent 2e5dca9 commit b2c8c0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion phpmyfaq/src/phpMyFAQ/Database/Sqlsrv.php
Expand Up @@ -118,7 +118,9 @@ public function escape($string): string
*/
public function fetchArray($result): ?array
{
return sqlsrv_fetch_array($result, SQLSRV_FETCH_ASSOC);
$fetchedData = sqlsrv_fetch_array($result, SQLSRV_FETCH_ASSOC);

return is_array($fetchedData) ? $fetchedData : [];
}

/**
Expand Down

0 comments on commit b2c8c0f

Please sign in to comment.