From 682e7d0f1a6b31e401396f3c81aaabcf48fcd647 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Tue, 16 Mar 2010 22:16:56 +0000 Subject: [PATCH] BUGFIX #5214 ViewableData::obj() was creating a DBField without a fieldname argument and caused problems, one example is the version panel of the CMS git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101154 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 e77599bb6..82af66973 100755 --- a/core/ViewableData.php +++ b/core/ViewableData.php @@ -391,7 +391,7 @@ class ViewableData extends Object implements IteratorAggregate { if(!is_object($value) && $forceReturnedObject) { $default = Object::get_static('ViewableData', 'default_cast'); - $value = new $default(); + $value = new $default($fieldName); } return $value;