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:
Ingo Schommer 2012-12-11 11:07:00 +01:00
parent 548ad503ed
commit d92258da8f

View File

@ -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;