mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG Ensure TreeMultiSelectField doesn't populate menus with "unchanged".
TreeMultiSelectField's default for its value property is 'unchanged' which causes menus to not load and generates console errors. Fixes #2795
This commit is contained in:
parent
48949ba89a
commit
9e2c7b6572
@ -279,7 +279,7 @@ class TreeDropdownField extends FormField {
|
||||
if( isset($_REQUEST['forceValue']) || $this->value ) {
|
||||
$forceValue = ( isset($_REQUEST['forceValue']) ? $_REQUEST['forceValue'] : $this->value);
|
||||
if(($values = preg_split('/,\s*/', $forceValue)) && count($values)) foreach($values as $value) {
|
||||
if(!$value) continue;
|
||||
if(!$value || $value == 'unchanged') continue;
|
||||
|
||||
$obj->markToExpose($this->objectForKey($value));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user