Skip to content

Commit ce30c63

Browse files
committed
Fix. Error when checking the "isClassExtendedWith" model if the model is not inherited from the "Model" class
1 parent 8c8d9be commit ce30c63

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Plugin.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,10 @@ protected function extendPagesForms(): void
165165
$this->addSeoTabFieldsToWidget($widget, 'viewBag');
166166
}
167167

168-
if ($widget->model->isClassExtendedWith(\Webmaxx\Seo\Behaviors\SeoTaggable::class)) {
168+
if (
169+
$widget->model instanceof \Model
170+
&& $widget->model->isClassExtendedWith(\Webmaxx\Seo\Behaviors\SeoTaggable::class)
171+
) {
169172
$this->addSeoTabFieldsToWidget($widget, $widget->model->seoTaggableRelationField() . '[tags]');
170173
}
171174
});

updates/version.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
'1.0.0':
22
- 'First version of plugin'
33
- 'v1.0.0/create_tags_table.php'
4+
'1.0.1':
5+
- 'Small update'
6+
'1.0.2':
7+
- 'Fix. Error when checking the "isClassExtendedWith" model if the model is not inherited from the "Model" class'

0 commit comments

Comments
 (0)