Make WordPress Core

Ticket #63678: 63678.diff

File 63678.diff, 736 bytes (added by anonymooo, 7 months ago)

diff file

  • src/wp-includes/class-wpdb.php

    diff --git a/src/wp-includes/class-wpdb.php b/src/wp-includes/class-wpdb.php
    index 1aec294317..db8c683042 100644
    a b class wpdb { 
    22992299                        $this->last_error = __( 'Unable to retrieve the error message from the database server' );
    23002300                }
    23012301
     2302                // User has reached 'max_questions' stop retrying
     2303                if ( 1226 === $mysql_errno ) {
     2304                        $message = '<h1>' . __( 'Cannot connect to database' ) . "</h1>\n";
     2305                        $message .= '<p>' . sprintf( $this->last_error );
     2306                        wp_die( $message );
     2307                }
     2308
    23022309                if ( $this->last_error ) {
    23032310                        // Clear insert_id on a subsequent failed insert.
    23042311                        if ( $this->insert_id && preg_match( '/^\s*(insert|replace)\s/i', $query ) ) {