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.
This commit is contained in:
jim-p 2009-08-15 00:44:25 -04:00
parent 9568c1a1b8
commit 02afa68458

View File

@ -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) {