Make WordPress Core

Ticket #58344: 58344.patch

File 58344.patch, 689 bytes (added by elrae, 11 months ago)
  • src/wp-includes/wp-db.php

    diff --git a/src/wp-includes/wp-db.php b/src/wp-includes/wp-db.php
    index 53ba207203..59404e0e89 100644
    a b class wpdb { 
    704704                if ( defined( 'WP_SETUP_CONFIG' ) ) {
    705705                        return;
    706706                }
    707 
    708                 $this->db_connect();
    709707        }
    710708
    711709        /**
    class wpdb { 
    19811979         *                  affected/selected for all other queries. Boolean false on error.
    19821980         */
    19831981        public function query( $query ) {
     1982                // If we have not connected to the database yet, initialize a connection.
     1983                if ( ! $this->has_connected ) {
     1984                        $this->db_connect();
     1985                }
     1986
    19841987                if ( ! $this->ready ) {
    19851988                        $this->check_current_query = true;
    19861989                        return false;