Upgrade to 3.5.1

This commit is contained in:
Bastian Allgeier
2021-01-19 12:20:38 +01:00
parent 8f55019e01
commit 99c36fa137
119 changed files with 2973 additions and 3707 deletions

View File

@@ -44,6 +44,10 @@ class Section extends Component
throw new InvalidArgumentException('Undefined section model');
}
if (is_a($attrs['model'], 'Kirby\Cms\Model') === false) {
throw new InvalidArgumentException('Invalid section model');
}
// use the type as fallback for the name
$attrs['name'] = $attrs['name'] ?? $type;
$attrs['type'] = $type;
@@ -65,7 +69,7 @@ class Section extends Component
*/
public function kirby()
{
return $this->model->kirby();
return $this->model()->kirby();
}
/**