Skip to content

Commit

Permalink
Merge pull request #7940 from Sesquipedalian/db_error_params
Browse files Browse the repository at this point in the history
Passes correct parameters to error() method of DatabaseApi objects
  • Loading branch information
Sesquipedalian authored Dec 5, 2023
2 parents 03799bd + 19ba335 commit f64c907
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/Db/APIs/MySQL.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ public function query($identifier, $db_string, $db_values = [], $connection = nu
$ret = @mysqli_query($connection, $db_string, self::$unbuffered ? MYSQLI_USE_RESULT : MYSQLI_STORE_RESULT);

if ($ret === false && empty($db_values['db_error_skip'])) {
$ret = $this->error($db_string, $connection);
$ret = $this->error($connection);
}

// Debugging.
Expand Down
2 changes: 1 addition & 1 deletion Sources/Db/APIs/PostgreSQL.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ public function query($identifier, $db_string, $db_values = [], $connection = nu
$this->last_result = @pg_query($connection, $db_string);

if ($this->last_result === false && empty($db_values['db_error_skip'])) {
$this->last_result = $this->error($db_string, $connection);
$this->last_result = $this->error($connection);
}

// Debugging.
Expand Down

0 comments on commit f64c907

Please sign in to comment.