From f55c575f95e8edae16d485851aa9956ee6559ae3 Mon Sep 17 00:00:00 2001 From: Hamish Friedlander Date: Sat, 11 Feb 2012 15:31:22 +1300 Subject: [PATCH] BUGFIX: allowing ssviewer to be called without function arguments --- view/SSViewer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/view/SSViewer.php b/view/SSViewer.php index 314e23f7a..d6dc92b63 100644 --- a/view/SSViewer.php +++ b/view/SSViewer.php @@ -338,7 +338,8 @@ class SSViewer_DataPresenter extends SSViewer_Scope { function __call($name, $arguments) { //extract the method name and parameters $property = $arguments[0]; //the name of the function being called - if ($arguments[1]) $params = $arguments[1]; //the function parameters in an array + + if (isset($arguments[1]) && $arguments[1] != null) $params = $arguments[1]; //the function parameters in an array else $params = array(); //check if the method to-be-called exists on the target object