Make WordPress Core

Changeset 29250


Ignore:
Timestamp:
07/19/2014 11:13:19 PM (11 years ago)
Author:
wonderboymusic
Message:

After [29200], switch back to using static vars instead of adding 2 globals, as per Sergey.

Fixes #28697.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-default-constants.php

    r29200 r29250  
    115115 *
    116116 * @since 3.0.0
    117  *
    118  * @global boolean $subdomain_error
    119  * @global boolean $subdomain_error_warn
    120117 */
    121118function ms_subdomain_constants() {
    122     global $subdomain_error, $subdomain_error_warn;
     119    static $subdomain_error = null;
     120    static $subdomain_error_warn = null;
    123121
    124122    if ( false === $subdomain_error ) {
  • trunk/tests/phpunit/tests/ms.php

    r29200 r29250  
    2424        parent::tearDown();
    2525        $wpdb->suppress_errors( $this->suppress );
    26     }
    27 
    28     /**
    29      * @ticket 28697
    30      */
    31     function test_ms_subdomain_constants() {
    32         global $subdomain_error;
    33 
    34         $this->assertFalse( $subdomain_error );
    35         ms_subdomain_constants();
    36         $this->assertFalse( $subdomain_error );
    3726    }
    3827
Note: See TracChangeset for help on using the changeset viewer.