diff options
author | jim-p <jimp@pfsense.org> | 2015-11-11 13:57:04 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2015-11-11 13:57:31 -0500 |
commit | 7ca5be34488ab0058ac2498bfc46b58934e41344 (patch) | |
tree | 37c4ba87d04e71da933264c6e852105fb2d63423 /src/usr/local/pkg | |
parent | 9d713b38d11242b93b41831297a8084c66e6803b (diff) | |
download | pfsense-7ca5be34488ab0058ac2498bfc46b58934e41344.zip pfsense-7ca5be34488ab0058ac2498bfc46b58934e41344.tar.gz |
Wrap UPnP permissions processing in is_array(), the var may not exist especially on upgrade.
Diffstat (limited to 'src/usr/local/pkg')
-rw-r--r-- | src/usr/local/pkg/miniupnpd.inc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/usr/local/pkg/miniupnpd.inc b/src/usr/local/pkg/miniupnpd.inc index 4ea768c..8b258e0 100644 --- a/src/usr/local/pkg/miniupnpd.inc +++ b/src/usr/local/pkg/miniupnpd.inc @@ -241,9 +241,11 @@ $config_text .= "model_number=" . $g['product_version'] . "\n"; /* upnp access restrictions */ - foreach ($upnp_config['row'] as $row) { - if ($row['permuser']) { - $config_text .= "{$row["permuser"]}\n"; + if (is_array($upnp_config['row'])) { + foreach ($upnp_config['row'] as $row) { + if ($row['permuser']) { + $config_text .= "{$row["permuser"]}\n"; + } } } |