summaryrefslogtreecommitdiffstats
path: root/usr/local/pkg
diff options
context:
space:
mode:
authorjim-p <jim@pingle.org>2009-08-15 00:44:25 -0400
committerjim-p <jim@pingle.org>2009-08-15 00:44:25 -0400
commit02afa68458c61a4081933112acfe95da0698d6ee (patch)
treecd35e9280bde5741319471131222fec05d29eb50 /usr/local/pkg
parent9568c1a1b8535f38e9eff3b393b5a4552d0335e1 (diff)
downloadpfsense-02afa68458c61a4081933112acfe95da0698d6ee.zip
pfsense-02afa68458c61a4081933112acfe95da0698d6ee.tar.gz
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.
Diffstat (limited to 'usr/local/pkg')
-rw-r--r--usr/local/pkg/miniupnpd.inc6
1 files changed, 5 insertions, 1 deletions
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) {
OpenPOWER on IntegriCloud