Skip to content

Commit 28c227a

Browse files
authored
Update TranslationBehavior.php
1 parent 36afba5 commit 28c227a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/behaviors/TranslationBehavior.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class TranslationBehavior extends Behavior
8787
public function init()
8888
{
8989
parent::init();
90-
if (!in_array($this->defaultLanguage, $this->languages)) {
90+
if (!array_key_exists($this->defaultLanguage, $this->languages)) {
9191
throw new InvalidConfigException('Default language must be exist');
9292
}
9393
}
@@ -236,4 +236,4 @@ public function __set($name, $value)
236236
parent::__set($name, $value);
237237
}
238238

239-
}
239+
}

0 commit comments

Comments
 (0)