From: Mike Taylor Date: Wed, 27 Jun 2007 10:44:57 +0000 (+0000) Subject: Protect utf8param() from undefined values. X-Git-Tag: CPAN-v1.02~396 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=75c8550ed7db72dde9b892ec941d8c8dca292dbd;p=irspy-moved-to-github.git Protect utf8param() from undefined values. --- diff --git a/lib/ZOOM/IRSpy/Utils.pm b/lib/ZOOM/IRSpy/Utils.pm index 82c7ece..2dbbe13 100644 --- a/lib/ZOOM/IRSpy/Utils.pm +++ b/lib/ZOOM/IRSpy/Utils.pm @@ -1,4 +1,4 @@ -# $Id: Utils.pm,v 1.32 2007-05-11 13:54:42 mike Exp $ +# $Id: Utils.pm,v 1.33 2007-06-27 10:44:57 mike Exp $ package ZOOM::IRSpy::Utils; @@ -35,6 +35,7 @@ sub utf8param { die "utf8param() called with value '$value'" if defined $value; my $raw = $r->param($key); + return undef if !defined $raw; my $cooked = decode_utf8($raw); warn "converted '$raw' to '", $cooked, "'\n" if $cooked ne $raw; return $cooked;