diff --git a/src/Syllable.php b/src/Syllable.php index 0b7faa0..2d3f7bd 100644 --- a/src/Syllable.php +++ b/src/Syllable.php @@ -652,7 +652,7 @@ private function parseWord($word) $scores = $this->patterns[$subword]; $scores_length = $length + 1; for ($offset = 0; $offset < $scores_length; ++$offset) { - $score = $scores{$offset}; + $score = $scores[$offset]; if (!isset($before[($start + $offset)]) || $score > $before[$start + $offset]) { $before[$start + $offset] = $score; }