Skip to content

Commit

Permalink
BUGFIX: Do not fail when null is given
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellienert committed Mar 5, 2020
1 parent 73288e9 commit 9ed61ff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Classes/Eel/ArchivistHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ class ArchivistHelper implements ProtectedContextAwareInterface
*/
public function buildSortingCharacter(?string $string, int $position = 0, int $length = 1): string
{
if ($string === null) {
return '#';
}

$character = mb_substr($string, $position, $length);

// Transliterate (transform 北京 to 'Bei Jing')
Expand Down

0 comments on commit 9ed61ff

Please sign in to comment.