Make WordPress Core


Ignore:
Timestamp:
08/05/2008 11:57:25 PM (18 years ago)
Author:
azaozz
Message:

Stop fatal error in post revisions when setting the include path is disabled. Props santosj, for 2.6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/wp-includes/pluggable.php

    r8324 r8563  
    15101510 */
    15111511function wp_text_diff( $left_string, $right_string, $args = null ) {
     1512    if ( defined( 'WP_INCLUDE_PATH_DISABLED' ) )
     1513        return '';
     1514
    15121515    $defaults = array( 'title' => '', 'title_left' => '', 'title_right' => '' );
    15131516    $args = wp_parse_args( $args, $defaults );
    1514 
    1515     // PEAR Text_Diff is lame; it includes things from include_path rather than it's own path.
    1516     // Not sure of the ramifications of disttributing modified code.
    1517     ini_set('include_path', '.' . PATH_SEPARATOR . ABSPATH . WPINC );
    15181517
    15191518    if ( !class_exists( 'WP_Text_Diff_Renderer_Table' ) )
     
    15351534    $diff = $renderer->render($text_diff);
    15361535
    1537     ini_restore('include_path');
    1538 
    15391536    if ( !$diff )
    15401537        return '';
Note: See TracChangeset for help on using the changeset viewer.