Skip to content

Commit

Permalink
Merge pull request #67 from micschk/patch-1
Browse files Browse the repository at this point in the history
Check if DataObject before calling ORM/::get() on class
  • Loading branch information
micschk authored Jan 18, 2021
2 parents 7ae7ab0 + b41547f commit 63a571e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controller/ShortcodableController.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public function shortcodePlaceHolder($request)
return;
}

if ($id) {
if ($id && is_subclass_of($classname, 'DataObject')) {
$object = $classname::get()->byID($id);
} else {
$object = singleton($classname);
Expand Down

0 comments on commit 63a571e

Please sign in to comment.