Index: pluggable.php
===================================================================
--- pluggable.php	(revision 8483)
+++ pluggable.php	(working copy)
@@ -1512,9 +1512,17 @@
 	$defaults = array( 'title' => '', 'title_left' => '', 'title_right' => '' );
 	$args = wp_parse_args( $args, $defaults );
 
-	// PEAR Text_Diff is lame; it includes things from include_path rather than it's own path.
-	// Not sure of the ramifications of disttributing modified code.
-	ini_set('include_path', '.' . PATH_SEPARATOR . ABSPATH . WPINC );
+	// PEAR Text_Diff depends on the include path matching its directory structure.
+	// This prevents modifying source code and maintaining the modifications when
+	// the package is updated.
+	// If include_path can not be set, then bail.
+	if( function_exists('set_include_path') ) {
+		set_include_path( get_include_path() . PATH_SEPARATOR . ABSPATH . WPINC );
+	} else if( function_exists('ini_set') ) {
+		ini_set('include_path', '.' . PATH_SEPARATOR . ABSPATH . WPINC );
+	} else {
+		return __('Error: Setting the include path is disabled on your server. Post revisions cannot be displayed. Please contact your hosting company to resolve this error.');
+	}
 
 	if ( !class_exists( 'WP_Text_Diff_Renderer_Table' ) )
 		require( ABSPATH . WPINC . '/wp-diff.php' );
@@ -1534,7 +1542,11 @@
 	$renderer  = new WP_Text_Diff_Renderer_Table();
 	$diff = $renderer->render($text_diff);
 
-	ini_restore('include_path');
+	if( function_exists('restore_include_path') ) {
+		restore_include_path();
+	} else if( function_exists('ini_restore') ) {
+		ini_restore('include_path');
+	}
 
 	if ( !$diff )
 		return '';

