1
0
mirror of https://github.com/flarum/core.git synced 2025-06-12 09:32:11 +02:00

fix: null as 2nd param is deprecated (#3801)

This commit is contained in:
IanM
2023-04-19 18:07:10 +01:00
committed by GitHub
parent 1792e22639
commit 8576df1a43

View File

@ -62,7 +62,7 @@ class Translator extends BaseTranslator implements TranslatorContract
{
foreach ($catalogue->all() as $domain => $messages) {
foreach ($messages as $id => $translation) {
if (preg_match(self::REFERENCE_REGEX, $translation, $matches)) {
if (! empty($translation) && preg_match(self::REFERENCE_REGEX, $translation, $matches)) {
$catalogue->set($id, $this->getTranslation($catalogue, $id, $domain), $domain);
}
}