From 601430653a80e329fd43b4a6d3ff511d9c8a5efb Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Mon, 9 Nov 2009 07:58:57 +0000 Subject: [PATCH] BUGFIX: Don't failover to standard value in ViewableData_Customised if the customised value is defined but isn't set. $obj->customise(array('Content'=>'')) should set Content to '' git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@91047 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/ViewableData.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/ViewableData.php b/core/ViewableData.php index dc61482d9..8f1941399 100755 --- a/core/ViewableData.php +++ b/core/ViewableData.php @@ -816,9 +816,9 @@ class ViewableData_Customised extends ViewableData { } public function cachedCall($field, $arguments = null, $identifier = null) { - $result = $this->customised->cachedCall($field, $arguments, $identifier); - - if(!$result) { + if($this->customised->hasMethod($field) || $this->customised->hasField($field)) { + $result = $this->customised->cachedCall($field, $arguments, $identifier); + } else { $result = $this->original->cachedCall($field, $arguments, $identifier); }