Skip to content

Commit

Permalink
Item10889: Avoiding uninitialised warnings OP_int
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@11953 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
PaulHarvey authored and PaulHarvey committed Jun 17, 2011
1 parent a6a7cbd commit b43b5c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/lib/Foswiki/Query/OP_int.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ sub new {
sub evaluate {
my $this = shift;
my $node = shift;
my $a = $node->{params}[0]->evaluate(@_);

# Item10889: The short-circuit || 0 is probably okay, int is numeric anyway
my $a = $node->{params}[0]->evaluate(@_) || 0;
return $this->collect( $a, sub { int $_[0] } );
}

Expand Down

0 comments on commit b43b5c2

Please sign in to comment.