Make WordPress Core

Ticket #11827: patch-compat.diff

File patch-compat.diff, 733 bytes (added by alexkingorg, 15 years ago)

More careful inclusion of Services_JSON in compat.php

  • wp-includes/compat.php

     
    129129                global $wp_json;
    130130
    131131                if ( !is_a($wp_json, 'Services_JSON') ) {
    132                         require_once( 'class-json.php' );
     132                        if ( !in_array('Services_JSON', get_declared_classes() ) )
     133                                require_once( 'class-json.php' );
     134
    133135                        $wp_json = new Services_JSON();
    134136                }
    135137
     
    142144                global $wp_json;
    143145
    144146                if ( !is_a($wp_json, 'Services_JSON') ) {
    145                         require_once( 'class-json.php' );
     147                        if ( !in_array('Services_JSON', get_declared_classes() ) )
     148                                require_once( 'class-json.php' );
     149                       
    146150                        $wp_json = new Services_JSON();
    147151                }
    148152