Skip to content

Commit 2cc5089

Browse files
committed
use the empty string instead of null as an array offset
1 parent 1458494 commit 2cc5089

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Slugger/AsciiSlugger.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ public function slug(string $string, string $separator = '-', ?string $locale =
131131

132132
if (\is_array($this->symbolsMap)) {
133133
$map = null;
134-
if (isset($this->symbolsMap[$locale])) {
135-
$map = $this->symbolsMap[$locale];
134+
if (isset($this->symbolsMap[$locale ?? ''])) {
135+
$map = $this->symbolsMap[$locale ?? ''];
136136
} else {
137137
$parent = self::getParentLocale($locale);
138138
if ($parent && isset($this->symbolsMap[$parent])) {

0 commit comments

Comments
 (0)