Skip to content

Commit

Permalink
Merge pull request #10589 from silverstripe-terraformers/pulls/runtem…
Browse files Browse the repository at this point in the history
…plate-fix
  • Loading branch information
michalkleiner authored Nov 24, 2022
2 parents dc98cad + 31d5aef commit f57a77d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/View/SSViewer_DataPresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ protected function getValueSource($property)
// Check if the method to-be-called exists on the target object - if so, don't check any further
// injection locations
$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;
}

Expand Down

0 comments on commit f57a77d

Please sign in to comment.