From: Florian Ragwitz Date: Thu, 12 Sep 2013 14:06:08 +0000 (-0400) Subject: Don't call length(undef) X-Git-Tag: v1.000004~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FHTML-String.git;a=commitdiff_plain;h=e8420dab517c57d30d9a3fa22de9966dc1c99c1b Don't call length(undef) strictures doesn't want us to. --- diff --git a/Changes b/Changes index 1d39c92..a0025ec 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,5 @@ + - Fix concatenating undef to HTML::String values. + 1.000003 - 2013-09-12 - Fix concatenating strings that evaluate to false in a boolean context. diff --git a/lib/HTML/String/Value.pm b/lib/HTML/String/Value.pm index e3803b8..e1f6c95 100644 --- a/lib/HTML/String/Value.pm +++ b/lib/HTML/String/Value.pm @@ -75,7 +75,7 @@ sub _hsv_unescaped_string { sub _hsv_dot { my ($self, $str, $prefix) = @_; - return $self unless length $str; + return $self unless defined $str && length $str; my @parts = @{$self->{parts}};