replaced return; with return undef;
This commit is contained in:
parent
ffa90c5fbd
commit
fa09c41598
113 changed files with 287 additions and 286 deletions
|
|
@ -91,7 +91,7 @@ A class method that returns a value to be used as the autogenerated ID for this
|
|||
=cut
|
||||
|
||||
sub generateIdParameter {
|
||||
return;
|
||||
return undef;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -112,7 +112,7 @@ sub getValueFromPost {
|
|||
if (defined $formValue) {
|
||||
return $formValue;
|
||||
} else {
|
||||
return;
|
||||
return undef;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ An optional value to use instead of POST input.
|
|||
sub getValueFromPost {
|
||||
my $self = shift;
|
||||
my $color = @_ ? shift : $self->session->form->param($self->get("name"));
|
||||
return unless $color =~ /\#\w{6}/;
|
||||
return undef unless $color =~ /\#\w{6}/;
|
||||
return $color;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ sub new {
|
|||
eval ($load);
|
||||
if ($@) {
|
||||
$session->errorHandler->error("Couldn't compile form control: ".$fieldType.". Root cause: ".$@);
|
||||
return;
|
||||
return undef;
|
||||
}
|
||||
my $formObj = $cmd->new($session, $param);
|
||||
if ($formObj->isa('WebGUI::Form::List')) {
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ sub getValueFromPost {
|
|||
if ($value =~ /^([0-9a-zA-Z]([-.+\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$/i) {
|
||||
return $value;
|
||||
}
|
||||
return;
|
||||
return undef;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -220,14 +220,14 @@ sub getValueFromPost {
|
|||
my @files = @{ $storage->getFiles };
|
||||
if (scalar(@files) < 1) {
|
||||
$storage->delete;
|
||||
return;
|
||||
return undef;
|
||||
} else {
|
||||
my $id = $storage->getId;
|
||||
$self->set("value", $id);
|
||||
return $id;
|
||||
}
|
||||
}
|
||||
return;
|
||||
return undef;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ A class method that returns a value to be used as the autogenerated ID for this
|
|||
=cut
|
||||
|
||||
sub generateIdParameter {
|
||||
return;
|
||||
return undef;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ sub getValueFromPost {
|
|||
@files = @images;
|
||||
}
|
||||
|
||||
return unless @files;
|
||||
return undef unless @files;
|
||||
$storage->generateThumbnail($_) for @images; # Make a thumbnail for each filename in @images
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ method.
|
|||
|
||||
sub correctValues {
|
||||
my ($self, $value) = @_;
|
||||
return unless defined $value;
|
||||
return undef unless defined $value;
|
||||
my @defaultValues;
|
||||
if (ref $value eq "ARRAY") {
|
||||
@defaultValues = @{ $value };
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ sub getValueFromPost {
|
|||
if ($value =~ /^[x\d \.\-\+\(\)]+$/ and $value =~ /\d/) {
|
||||
return $value;
|
||||
}
|
||||
return;
|
||||
return undef;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ A class method that returns a value to be used as the autogenerated ID for this
|
|||
=cut
|
||||
|
||||
sub generateIdParameter {
|
||||
return;
|
||||
return undef;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ Returns undef.
|
|||
=cut
|
||||
|
||||
sub getValueFromPost {
|
||||
return;
|
||||
return undef;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -103,7 +103,7 @@ Outputs nothing.
|
|||
=cut
|
||||
|
||||
sub toHtmlAsHidden {
|
||||
return;
|
||||
return undef;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ sub getSliderValue {
|
|||
return $i if $keys[$i] eq $self->get('value')->[0];
|
||||
}
|
||||
|
||||
return;
|
||||
return undef;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ sub getValueFromPost {
|
|||
return $value
|
||||
}
|
||||
else {
|
||||
return;
|
||||
return undef;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -147,7 +147,7 @@ sub getValueFromPost {
|
|||
} else {
|
||||
# Mysql format
|
||||
my $value = $self->session->form->param($self->get("name"));
|
||||
return unless $value =~ /^\d{2}\D\d{2}(\D\d{2})?$/;
|
||||
return undef unless $value =~ /^\d{2}\D\d{2}(\D\d{2})?$/;
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ sub getValueFromPost {
|
|||
if ($value =~ /^[A-Z\d\s\-]+$/) {
|
||||
return $value;
|
||||
}
|
||||
return;
|
||||
return undef;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue