mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-03 05:48:11 +08:00
Fixes for PHP 7.2 compatibility (#14959)
This commit is contained in:
committed by
Alexander Makarov
parent
d49ec7b8be
commit
64d8af61a6
@ -759,7 +759,9 @@ class ActiveQuery extends Query implements ActiveQueryInterface
|
||||
*/
|
||||
public function viaTable($tableName, $link, callable $callable = null)
|
||||
{
|
||||
$relation = new self(get_class($this->primaryModel), [
|
||||
$modelClass = $this->primaryModel !== null ? get_class($this->primaryModel) : get_class();
|
||||
|
||||
$relation = new self($modelClass, [
|
||||
'from' => [$tableName],
|
||||
'link' => $link,
|
||||
'multiple' => true,
|
||||
|
||||
Reference in New Issue
Block a user