From ebbcf036ee1f015c1c035fb3b73c7b7e43f9f1a2 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 2 Jun 2009 04:02:28 +0000 Subject: [PATCH] BUGFIX: Treat _method() as a cacheable method but not __method() git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78240 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/ViewableData.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/ViewableData.php b/core/ViewableData.php index 0509c1f89..e05b368f7 100644 --- a/core/ViewableData.php +++ b/core/ViewableData.php @@ -78,7 +78,7 @@ class ViewableData extends Object implements IteratorAggregate { // Set up cached methods $methodNames = $this->allMethodNames(); foreach($methodNames as $methodName) { - if($methodName[0] == "_") { + if($methodName[0] == "_" && $methodName[1] != "_") { $trimmedName = substr($methodName,1); $this->createMethod($trimmedName, "return \$obj->cachedCall('$methodName', '$trimmedName', \$args);"); }