mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Allow calling SSViewer_Scope on empty sets
Specifically fixes a bug where a SelectionGroup_Item without a "child" field causes fatal errors.
This commit is contained in:
parent
548ad503ed
commit
d92258da8f
@ -141,7 +141,7 @@ class SSViewer_Scope {
|
||||
|
||||
public function __call($name, $arguments) {
|
||||
$on = $this->itemIterator ? $this->itemIterator->current() : $this->item;
|
||||
$retval = call_user_func_array(array($on, $name), $arguments);
|
||||
$retval = $on ? call_user_func_array(array($on, $name), $arguments) : null;
|
||||
|
||||
$this->resetLocalScope();
|
||||
return $retval;
|
||||
|
Loading…
x
Reference in New Issue
Block a user