From ad06ed73b3e1d5932d874ef389daa109307db723 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Mon, 21 Jul 2014 10:08:44 +0200 Subject: [PATCH] HTML::Util: Short circuit ohne $value. Behebt gleichzeitig eine Warnung. --- SL/HTML/Util.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SL/HTML/Util.pm b/SL/HTML/Util.pm index 72a7a7f57..ed5ffdec9 100644 --- a/SL/HTML/Util.pm +++ b/SL/HTML/Util.pm @@ -17,6 +17,8 @@ sub strip { my $value = !ref($class_or_value) && (($class_or_value // '') eq 'SL::HTML::Util') ? $_[1] : $class_or_value; + return '' unless $value; + if (!%stripper) { %stripper = ( parser => HTML::Parser->new ); -- 2.20.1