Skip to content

Commit

Permalink
Item13186: Not all items have CHECK options available
Browse files Browse the repository at this point in the history
Not sure if this is correct. If no check options, should we default to
undefok / emptyok ?
  • Loading branch information
gac410 committed Jan 9, 2015
1 parent 6f685c7 commit 7a4e66b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/lib/Foswiki/Configure/Wizards/Save.pm
Expand Up @@ -429,13 +429,15 @@ sub _generateLSC {
if ( !defined $datum ) {

# An undef value and undefok will suppress the item in LSC
return () if $vs->CHECK_option('undefok');
return ()
if ( $vs->can('CHECK_option') && $vs->CHECK_option('undefok') );

}
elsif ( $datum eq '' ) {

# Treat '' as undef unless emptyok
return () unless $vs->CHECK_option('emptyok');
return ()
if ( $vs->can('CHECK_option') && $vs->CHECK_option('emptyok') );
}
my $d = Foswiki::Configure::Reporter::uneval($datum);
push( @dump, "\$Foswiki::cfg$keys = $d;\n" );
Expand Down

0 comments on commit 7a4e66b

Please sign in to comment.