Skip to content

Commit

Permalink
refactor: pg_last_error() always returns string
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Dec 27, 2024
1 parent 0bb7119 commit fe32cbb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions system/Database/Postgre/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -461,10 +461,9 @@ protected function _enableForeignKeyChecks()
*/
public function error(): array
{
$lastError = pg_last_error($this->connID);
return [
'code' => '',
'message' => ! in_array($lastError, ['', '0'], true) ? $lastError : '',
'message' => pg_last_error($this->connID),
];
}

Expand Down

0 comments on commit fe32cbb

Please sign in to comment.