From 6dc1448cc47de582b19d3a6cdb8a6f87139470da Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Wed, 15 Dec 2010 05:30:42 +0000 Subject: [PATCH] BUGFIX ViewableData::defineMethods() broken method cache because of parameter mismatch to create_function() git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115063 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/ViewableData.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/ViewableData.php b/core/ViewableData.php index 2b82b130e..7e5fb0672 100755 --- a/core/ViewableData.php +++ b/core/ViewableData.php @@ -179,8 +179,8 @@ class ViewableData extends Object implements IteratorAggregate { foreach($this->allMethodNames() as $method) { if($method[0] == '_' && $method[1] != '_') { - $this->createMethod ( - substr($method, 1), "return \$obj->cachedCall('$method', '" . substr($method, 1) . "', \$args);" + $this->createMethod( + substr($method, 1), "return \$obj->cachedCall('$method', \$args, '" . substr($method, 1) . "');" ); } }