Skip to content

Commit f3ad529

Browse files
committed
PHP80 Deprecated pg_errormessage()pg_last_error()
Signed-off-by: Nathanael Esayeas <[email protected]>
1 parent bfe27d8 commit f3ad529

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Adapter/Driver/Pgsql/Connection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
use function is_array;
1414
use function is_resource;
1515
use function pg_connect;
16-
use function pg_errormessage;
1716
use function pg_fetch_result;
17+
use function pg_last_error;
1818
use function pg_query;
1919
use function pg_set_client_encoding;
2020
use function restore_error_handler;
@@ -263,7 +263,7 @@ public function execute($sql)
263263

264264
// if the returnValue is something other than a pg result resource, bypass wrapping it
265265
if ($resultResource === false) {
266-
throw new Exception\InvalidQueryException(pg_errormessage());
266+
throw new Exception\InvalidQueryException(pg_last_error($this->resource));
267267
}
268268

269269
return $this->driver->createResult($resultResource === true ? $this->resource : $resultResource);

0 commit comments

Comments
 (0)