File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 13
13
use function is_array ;
14
14
use function is_resource ;
15
15
use function pg_connect ;
16
- use function pg_errormessage ;
17
16
use function pg_fetch_result ;
17
+ use function pg_last_error ;
18
18
use function pg_query ;
19
19
use function pg_set_client_encoding ;
20
20
use function restore_error_handler ;
@@ -263,7 +263,7 @@ public function execute($sql)
263
263
264
264
// if the returnValue is something other than a pg result resource, bypass wrapping it
265
265
if ($ resultResource === false ) {
266
- throw new Exception \InvalidQueryException (pg_errormessage ( ));
266
+ throw new Exception \InvalidQueryException (pg_last_error ( $ this -> resource ));
267
267
}
268
268
269
269
return $ this ->driver ->createResult ($ resultResource === true ? $ this ->resource : $ resultResource );
You can’t perform that action at this time.
0 commit comments