Fix php notice

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44243 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2007-11-05 01:44:48 +00:00
parent 68e9570c8d
commit 08c91feabc

View File

@ -120,6 +120,7 @@ class EditableRadioField extends EditableFormField {
function createField( $asFilter = false ) { function createField( $asFilter = false ) {
$optionSet = $this->Options(); $optionSet = $this->Options();
$options = array(); $options = array();
$defaultOption = '';
if( $asFilter ) if( $asFilter )
$options['-1'] = '(Any)'; $options['-1'] = '(Any)';
@ -132,7 +133,7 @@ class EditableRadioField extends EditableFormField {
} }
// return radiofields // return radiofields
return new OptionsetField( $this->Name, $this->Title, $options, $defaultOption ); return new OptionsetField($this->Name, $this->Title, $options, $defaultOption);
} }
function prepopulate( $value ) { function prepopulate( $value ) {
@ -182,4 +183,4 @@ protected function createOption( $name, $title, $id, $sort = 0, $isDefault = fal
return $option->EditSegment(); return $option->EditSegment();
} }
} }
?> ?>