From 34ba79f969541d8d26d2cec5925a4d0c87cba821 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Thu, 17 Jul 2008 12:30:40 +0000 Subject: [PATCH] Fix handling of non-unified diffs in wfDiff --- includes/GlobalFunctions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 7dbe0dd337..9e7b1fa01e 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1226,10 +1226,10 @@ function wfDiff( $before, $after, $params = '-u' ) { // Kill the --- and +++ lines. They're not useful. $diff_lines = explode( "\n", $diff ); - if (strpos( '---', $diff_lines[0] ) == 0) { + if (strpos( $diff_lines[0], '---' ) === 0) { unset($diff_lines[0]); } - if (strpos( '+++', $diff_lines[1] ) == 0) { + if (strpos( $diff_lines[1], '+++' ) === 0) { unset($diff_lines[1]); } -- 2.20.1