From 734fbdf6cbda7dc75a99185ea6f18ea6f41790c3 Mon Sep 17 00:00:00 2001 From: Michael van Schaik Date: Mon, 18 Jan 2021 09:00:10 +0100 Subject: [PATCH] Update ShortcodableController.php --- src/Controller/ShortcodableController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Controller/ShortcodableController.php b/src/Controller/ShortcodableController.php index 795fa49..f649256 100644 --- a/src/Controller/ShortcodableController.php +++ b/src/Controller/ShortcodableController.php @@ -13,6 +13,7 @@ use SilverStripe\Forms\FieldList; use SilverStripe\Forms\FormAction; use SilverStripe\Forms\Form; +use SilverStripe\ORM\DataObject; use SilverStripe\Security\Permission; /** @@ -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);