From 895644cf9fb3c66bdc876c0c87447414b3450e28 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sat, 21 Nov 2009 01:41:06 +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 '' (from r91047) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92451 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 e8cdd88bf..86bb248ca 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); }