mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: allowing ssviewer to be called without function arguments
This commit is contained in:
parent
156d2226fc
commit
f55c575f95
@ -338,7 +338,8 @@ class SSViewer_DataPresenter extends SSViewer_Scope {
|
|||||||
function __call($name, $arguments) {
|
function __call($name, $arguments) {
|
||||||
//extract the method name and parameters
|
//extract the method name and parameters
|
||||||
$property = $arguments[0]; //the name of the function being called
|
$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();
|
else $params = array();
|
||||||
|
|
||||||
//check if the method to-be-called exists on the target object
|
//check if the method to-be-called exists on the target object
|
||||||
|
Loading…
Reference in New Issue
Block a user