From 98372077171b20086dec81965e4df9ead8c031ab Mon Sep 17 00:00:00 2001 From: hackjan Date: Mon, 23 Dec 2013 16:37:04 +0800 Subject: [PATCH] bug fix bug fix --- lib/Diff/SequenceMatcher.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Diff/SequenceMatcher.php b/lib/Diff/SequenceMatcher.php index e819e810..919860eb 100644 --- a/lib/Diff/SequenceMatcher.php +++ b/lib/Diff/SequenceMatcher.php @@ -631,7 +631,7 @@ private function quickRatio() { if($this->fullBCount === null) { $this->fullBCount = array(); - $bLength = count ($b); + $bLength = count ($this->b); for($i = 0; $i < $bLength; ++$i) { $char = $this->b[$i]; $this->fullBCount[$char] = $this->arrayGetDefault($this->fullBCount, $char, 0) + 1; @@ -729,7 +729,7 @@ private function tupleSort($a, $b) } } - if(count($a) == $count($b)) { + if(count($a) == count($b)) { return 0; } else if(count($a) < count($b)) { @@ -739,4 +739,4 @@ private function tupleSort($a, $b) return 1; } } -} \ No newline at end of file +}