From 02afa68458c61a4081933112acfe95da0698d6ee Mon Sep 17 00:00:00 2001 From: jim-p Date: Sat, 15 Aug 2009 00:44:25 -0400 Subject: Fix potential bug in UPnP config. If the shaper has never been used, the value being checked may not exist or not be an array. --- usr/local/pkg/miniupnpd.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'usr/local/pkg/miniupnpd.inc') diff --git a/usr/local/pkg/miniupnpd.inc b/usr/local/pkg/miniupnpd.inc index 328d9ec..8d45bad 100644 --- a/usr/local/pkg/miniupnpd.inc +++ b/usr/local/pkg/miniupnpd.inc @@ -34,7 +34,11 @@ function upnp_validate_queue($qname) { read_altq_config(); $qlist = get_altq_name_list(); - return in_array($qname, $qlist); + if (is_array($qlist)) { + return in_array($qname, $qlist); + } else { + return false; + } } function upnp_validate_ip($ip, $check_cdir) { -- cgit v1.1