File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -125,8 +125,12 @@ protected function instantiateWidget(array $params = [])
125125 $ fqcn = $ rootNamespace .'\\' .$ this ->widgetName ;
126126 $ widgetClass = class_exists ($ fqcn ) ? $ fqcn : $ this ->widgetName ;
127127
128+ if (!class_exists ($ widgetClass )) {
129+ throw new InvalidWidgetClassException ('Class " ' .$ widgetClass .'" does not exist ' );
130+ }
131+
128132 if (!is_subclass_of ($ widgetClass , 'Arrilot\Widgets\AbstractWidget ' )) {
129- throw new InvalidWidgetClassException ('Class " ' .$ widgetClass .'" must exist and extend "Arrilot\Widgets\AbstractWidget" class ' );
133+ throw new InvalidWidgetClassException ('Class " ' .$ widgetClass .'" must extend "Arrilot\Widgets\AbstractWidget" class ' );
130134 }
131135
132136 $ this ->widget = new $ widgetClass ($ this ->widgetConfig );
You can’t perform that action at this time.
0 commit comments