Skip to content

Commit 493aab6

Browse files
committed
Fix PHP 8.5 deprecated errors
1 parent d75dfe4 commit 493aab6

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/Scanner/Scanner.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ public function __construct(Translations ...$allTranslations)
1919
{
2020
foreach ($allTranslations as $translations) {
2121
$domain = $translations->getDomain();
22+
23+
if (is_null($domain)) {
24+
$domain = '';
25+
}
26+
2227
$this->translations[$domain] = $translations;
2328
}
2429
}
@@ -57,6 +62,10 @@ protected function saveTranslation(
5762
$domain = $this->defaultDomain;
5863
}
5964

65+
if (is_null($domain)) {
66+
$domain = '';
67+
}
68+
6069
if (!isset($this->translations[$domain])) {
6170
return null;
6271
}

0 commit comments

Comments
 (0)