Skip to content

Commit

Permalink
Update ShortcodableController.php
Browse files Browse the repository at this point in the history
  • Loading branch information
micschk authored Jan 18, 2021
1 parent 63a571e commit 734fbdf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Controller/ShortcodableController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\Form;
use SilverStripe\ORM\DataObject;
use SilverStripe\Security\Permission;

/**
Expand Down Expand Up @@ -227,7 +228,7 @@ public function shortcodePlaceHolder($request)
return;
}

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

0 comments on commit 734fbdf

Please sign in to comment.