Skip to content

Commit

Permalink
Force MYSQLI_REPORT_OFF for PHP 8.1+ compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
kovshenin committed May 17, 2023
1 parent fd02892 commit e5f5ce4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ludicrousdb/includes/class-ludicrousdb.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,11 @@ public function run_callbacks( $group, $args = null ) {
*/
public function db_connect( $query = '' ) {

// PHP 8.1+ compat, see: https://core.trac.wordpress.org/changeset/51582
if ( $this->use_mysqli ) {
mysqli_report( MYSQLI_REPORT_OFF );
}

// Bail if empty query
if ( empty( $query ) ) {
return false;
Expand Down

0 comments on commit e5f5ce4

Please sign in to comment.