From 68379b31e731a6cdd942e99bb339bafe1a4c8dc1 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Wed, 27 Jun 2007 10:44:57 +0000 Subject: [PATCH 1/1] Protect utf8param() from undefined values. --- lib/ZOOM/IRSpy/Utils.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 1.7.10.4