Skip to content

Commit

Permalink
fix undefined string warning
Browse files Browse the repository at this point in the history
Use of uninitialized value $kw in pattern match (m//) .. cgi-bin/LJ/Keywords.pm line 65.
  • Loading branch information
kareila committed Feb 4, 2017
1 parent 9ea4199 commit 93ef028
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cgi-bin/LJ/Keywords.pm
Expand Up @@ -62,7 +62,7 @@ sub get_sitekeyword_id {
$autovivify = 1 unless defined $autovivify;

# setup the keyword for use
return 0 unless $kw =~ /\S/;
return 0 unless defined $kw && $kw =~ /\S/;
$kw = LJ::text_trim( $kw, LJ::BMAX_SITEKEYWORD, LJ::CMAX_SITEKEYWORD );
$kw = LJ::utf8_lc( $kw ) unless $opts{allowmixedcase};

Expand Down

0 comments on commit 93ef028

Please sign in to comment.