Skip to content

Commit fe32cbb

Browse files
committed
refactor: pg_last_error() always returns string
1 parent 0bb7119 commit fe32cbb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

system/Database/Postgre/Connection.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,10 +461,9 @@ protected function _enableForeignKeyChecks()
461461
*/
462462
public function error(): array
463463
{
464-
$lastError = pg_last_error($this->connID);
465464
return [
466465
'code' => '',
467-
'message' => ! in_array($lastError, ['', '0'], true) ? $lastError : '',
466+
'message' => pg_last_error($this->connID),
468467
];
469468
}
470469

0 commit comments

Comments
 (0)