Skip to content

Commit

Permalink
BUGFIX: Fix firstLetter… methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin-K committed Aug 9, 2018
1 parent 831dc10 commit 9894378
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Classes/Service/HyphenationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ protected function wordHyphenation($words, $locale)
*/
protected function firstLetterIsUppercase(string $word)
{
$chr = mb_substr($str, 0, 1, 'UTF-8');
$chr = mb_substr($word, 0, 1, 'UTF-8');
return mb_strtolower($chr, 'UTF-8') != $chr;
}

Expand All @@ -238,8 +238,8 @@ protected function firstLetterIsUppercase(string $word)
*/
protected function firstLetterToUppercase(string $word)
{
$firstChar = mb_substr($string, 0, 1, 'UTF-8');
$nextChars = mb_substr($string, 1, null, 'UTF-8');
$firstChar = mb_substr($word, 0, 1, 'UTF-8');
$nextChars = mb_substr($word, 1, null, 'UTF-8');
return mb_strtoupper($firstChar, 'UTF-8') . $nextChars;
}

Expand Down

0 comments on commit 9894378

Please sign in to comment.