Skip to content

Commit 3b781d2

Browse files
luokuncoolovertrue
authored andcommitted
Update Pinyin.php (#95)
1 parent a613c57 commit 3b781d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Pinyin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,9 @@ protected function format($pinyin, $tone = false)
298298
'à' => array('a', 4), 'è' => array('e', 4), 'ì' => array('i', 4), 'ò' => array('o', 4), 'ù' => array('u', 4), 'ǜ' => array('v', 4),
299299
);
300300

301-
foreach ($replacements as $unicde => $replacements) {
301+
foreach ($replacements as $unicde => $replacement) {
302302
if (false !== strpos($pinyin, $unicde)) {
303-
$pinyin = str_replace($unicde, $replacements[0], $pinyin).($tone ? $replacements[1] : '');
303+
$pinyin = str_replace($unicde, $replacement[0], $pinyin).($tone ? $replacement[1] : '');
304304
}
305305
}
306306

0 commit comments

Comments
 (0)