mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX PHP 5.2 doesn't allow calling a static method like $className::$staticMethod()
This commit is contained in:
parent
193288a021
commit
68d83d187b
@ -328,7 +328,7 @@ class SSViewer_DataPresenter extends SSViewer_Scope {
|
|||||||
if ($createObject) $implementer = new $implementer();
|
if ($createObject) $implementer = new $implementer();
|
||||||
|
|
||||||
// Get the exposed variables
|
// Get the exposed variables
|
||||||
$exposedVariables = $implementer::$variableMethod();
|
$exposedVariables = call_user_func(array($implementer, $variableMethod));
|
||||||
|
|
||||||
foreach($exposedVariables as $varName => $details) {
|
foreach($exposedVariables as $varName => $details) {
|
||||||
if (!is_array($details)) $details = array('method' => $details, 'casting' => Object::get_static('ViewableData', 'default_cast'));
|
if (!is_array($details)) $details = array('method' => $details, 'casting' => Object::get_static('ViewableData', 'default_cast'));
|
||||||
|
Loading…
Reference in New Issue
Block a user