๐Ÿ’Ž PREMIUM: Changeset/ - Uncensored 2025

Changeset 56152


Ignore:
Timestamp:
07/06/2023 01:52:56 PM (2 years ago)
Author:
audrasjb
Message:

Boostrap/Load: Incorrect condition in wp_check_php_mysql_versions().

This changeset adds a check for the existence of db.php at the default path ABSPATH . 'wp-content/db.php', even if WP_CONTENT_DIR is defined and db.php
is placed in WP_CONTENT_DIR.

Follow-up to [49161].

Props mikeyzm, SergeyBiryukov, hztyfoon,
Fixes #58201.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/load.php

    r56065 r56152 ย 
    163163    }
    164164
    165ย     if ( ! function_exists( 'mysqli_connect' ) && ! function_exists( 'mysql_connect' )
    166ย         // This runs before default constants are defined, so we can't assume WP_CONTENT_DIR is set yet.
    167ย         && ( defined( 'WP_CONTENT_DIR' ) && ! file_exists( WP_CONTENT_DIR . '/db.php' )
    168ย             || ! file_exists( ABSPATH . 'wp-content/db.php' ) )
    ย 165    // This runs before default constants are defined, so we can't assume WP_CONTENT_DIR is set yet.
    ย 166    $wp_content_dir = defined( 'WP_CONTENT_DIR' ) ? WP_CONTENT_DIR : ABSPATH . 'wp-content';
    ย 167
    ย 168    if ( ! function_exists( 'mysqli_connect' )
    ย 169        && ! function_exists( 'mysql_connect' )
    ย 170        && ! file_exists( $wp_content_dir . '/db.php' )
    169171    ) {
    170172        require_once ABSPATH . WPINC . '/functions.php';
Note: See TracChangeset for help on using the changeset viewer.