From d92258da8fafb96ea8e433a554463e2b3a872945 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 11 Dec 2012 11:07:00 +0100 Subject: [PATCH] Allow calling SSViewer_Scope on empty sets Specifically fixes a bug where a SelectionGroup_Item without a "child" field causes fatal errors. --- view/SSViewer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/SSViewer.php b/view/SSViewer.php index f0cade1e6..226d981fe 100644 --- a/view/SSViewer.php +++ b/view/SSViewer.php @@ -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;