Make WordPress Core


Ignore:
Timestamp:
09/04/2012 02:38:37 AM (14 years ago)
Author:
nacin
Message:

Don't include functions.php in wp_load_translations_early()
to avoid a parse error in a PHP4 environment (caused by use of
the clone keyword in option.php).

Manually include functions.php in the rare situations where it
is not already included by the time we need to load translations
early.

Remove the functions.php dependency by switching the wp_die() calls
to die(), in wp_check_php_mysql_versions().

props SergeyBiryukov, see #21316, for trunk.

File:
1 edited

Legend:

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

    r21693 r21715  
    106106        if ( version_compare( $required_php_version, $php_version, '>' ) ) {
    107107                wp_load_translations_early();
    108                 wp_die( sprintf( __( 'Your server is running PHP version %1$s but WordPress %2$s requires at least %3$s.' ), $php_version, $wp_version, $required_php_version ) );
     108                die( sprintf( __( 'Your server is running PHP version %1$s but WordPress %2$s requires at least %3$s.' ), $php_version, $wp_version, $required_php_version ) );
    109109        }
    110110
    111111        if ( ! extension_loaded( 'mysql' ) && ! file_exists( WP_CONTENT_DIR . '/db.php' ) ) {
    112112                wp_load_translations_early();
    113                 wp_die( __( 'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.' ) );
     113                die( __( 'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.' ) );
    114114        }
    115115}
     
    710710
    711711        // General libraries
    712         require_once ABSPATH . WPINC . '/functions.php';
    713712        require_once ABSPATH . WPINC . '/plugin.php';
    714713
Note: See TracChangeset for help on using the changeset viewer.