diff --git a/src/ORM/Behavior/TranslateBehavior.php b/src/ORM/Behavior/TranslateBehavior.php index f424ad4ddcc..90cc5de14b7 100644 --- a/src/ORM/Behavior/TranslateBehavior.php +++ b/src/ORM/Behavior/TranslateBehavior.php @@ -110,8 +110,15 @@ public function initialize(array $config) } else { $this->_translationTable = TableRegistry::get($translationAlias); } - - $this->config('conditions.model', $this->config('model') ?: $this->config('conditions.model') ?: $this->_table->alias()); + + if ($this->config('model')) { + $model = $this->config('model'); + } elseif ($this->config('conditions.model')) { + $model = $this->config('conditions.model'); + } else { + $model = $this->_table->alias(); + } + $this->config('conditions.model', $model); $this->setupFieldAssociations( $this->_config['fields'],