mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-04 00:37:56 +02:00
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
This commit is contained in:
parent
f2bb6baa9f
commit
682e7d0f1a
@ -391,7 +391,7 @@ class ViewableData extends Object implements IteratorAggregate {
|
|||||||
|
|
||||||
if(!is_object($value) && $forceReturnedObject) {
|
if(!is_object($value) && $forceReturnedObject) {
|
||||||
$default = Object::get_static('ViewableData', 'default_cast');
|
$default = Object::get_static('ViewableData', 'default_cast');
|
||||||
$value = new $default();
|
$value = new $default($fieldName);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $value;
|
return $value;
|
||||||
|
Loading…
Reference in New Issue
Block a user