Unverified Commit 146ccf14 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(errors) Warn early when an origin is not valid

issue #6071
parent 03e967a2
No related merge requests found
Showing with 3 additions and 1 deletion
+3 -1
...@@ -45,9 +45,11 @@ class SimplePluginError extends FusionDirectoryError ...@@ -45,9 +45,11 @@ class SimplePluginError extends FusionDirectoryError
if ($origin instanceof SimpleTab) { if ($origin instanceof SimpleTab) {
$this->tab = $origin; $this->tab = $origin;
$this->object = $this->tab->parent; $this->object = $this->tab->parent;
} else { } elseif ($origin instanceof simpleTabs) {
$this->tab = NULL; $this->tab = NULL;
$this->object = $origin; $this->object = $origin;
} else {
trigger_error('Invalid origin of class '.get_class($origin));
} }
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment