From d234a1e8d4ff5b255f3663f795645ce8383e8fde Mon Sep 17 00:00:00 2001 From: dms Date: Fri, 2 Feb 2001 13:42:26 +0000 Subject: [PATCH] check if int is defined for fixPlural git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@308 c11ca15a-4712-0410-83d8-924469b57eb5 --- blootbot/src/Misc.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/blootbot/src/Misc.pl b/blootbot/src/Misc.pl index 2ae258d..76dc9b7 100644 --- a/blootbot/src/Misc.pl +++ b/blootbot/src/Misc.pl @@ -249,6 +249,11 @@ sub fixPlural { return; } + if (!defined $int or $int =~ /^\D+$/) { + &WARN("fixPlural: int != defined or int"); + return $str; + } + if ($str eq "has") { $str = "have" if ($int > 1); } elsif ($str eq "is") { -- 2.39.5