mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +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 (from r101154)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111962 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
79459d72ad
commit
7d248e6835
@ -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