Skip to content

Commit 137fcf0

Browse files
committed
fix using undefined value
1 parent b002689 commit 137fcf0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/bp_functions.pm

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ use utf8;
1414
sub echo_function {
1515
my($c, $bp, $n, $args, $livedata) = @_;
1616
my($text, $reverse, $upper) = @{$args};
17-
$text = scalar reverse $text if $reverse eq 'yes';
18-
$text = uc $text if $upper eq 'yes';
17+
$text = scalar reverse $text if ($reverse//'') eq 'yes';
18+
$text = uc $text if ($upper//'') eq 'yes';
1919
return(0, $text, $text, {});
2020
}
2121

0 commit comments

Comments
 (0)