mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #10589 from silverstripe-terraformers/pulls/runtemplate-fix
This commit is contained in:
commit
f57a77dcdd
@ -355,7 +355,7 @@ class SSViewer_DataPresenter extends SSViewer_Scope
|
|||||||
// Check if the method to-be-called exists on the target object - if so, don't check any further
|
// Check if the method to-be-called exists on the target object - if so, don't check any further
|
||||||
// injection locations
|
// injection locations
|
||||||
$on = $this->itemIterator ? $this->itemIterator->current() : $this->item;
|
$on = $this->itemIterator ? $this->itemIterator->current() : $this->item;
|
||||||
if (isset($on->$property) || method_exists($on, $property ?? '')) {
|
if ($on && (isset($on->$property) || method_exists($on, $property ?? ''))) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user