sheadawson / silverstripe-shortcodable

Provides a GUI for CMS users to insert Shortcodes into the HTMLEditorField + an API for developers to define Shortcodable DataObjects and Views.
MIT License
48 stars 36 forks source link

Check if DataObject before calling ORM/::get() on class #67

Closed micschk closed 3 years ago

micschk commented 6 years ago

A shortcode may have an id attribute without necessarily representing a database record, so we should check first. (NOTE BEFORE MERGING: SS4 may require checking for 'SilverStripe\ORM\DataObject' instead?)

sheadawson commented 6 years ago

@micschk good question, I don't know the answer. Will have a look into it later in the week when I'm working on an SS4 project