Make WordPress Core

Ticket #7391: 7391.patch

File 7391.patch, 1007 bytes (added by azaozz, 16 years ago)
  • wp-includes/pluggable.php

     
    15141514
    15151515        // PEAR Text_Diff is lame; it includes things from include_path rather than it's own path.
    15161516        // Not sure of the ramifications of disttributing modified code.
    1517         ini_set('include_path', '.' . PATH_SEPARATOR . ABSPATH . WPINC );
     1517        if ( ! @set_include_path( @get_include_path() . PATH_SEPARATOR . ABSPATH . WPINC ) )
     1518                return __('Error: the PHP function set_include_path() is disabled on your server. Post revisions cannot be displayied. Please contact your hosting company to resolve this error.');
    15181519
    15191520        if ( !class_exists( 'WP_Text_Diff_Renderer_Table' ) )
    15201521                require( ABSPATH . WPINC . '/wp-diff.php' );
     
    15341535        $renderer  = new WP_Text_Diff_Renderer_Table();
    15351536        $diff = $renderer->render($text_diff);
    15361537
    1537         ini_restore('include_path');
    1538 
    15391538        if ( !$diff )
    15401539                return '';
    15411540