diff options
author | Phil Davis <phil@jankaritech.com> | 2017-04-25 18:22:22 +0545 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-25 18:22:22 +0545 |
commit | 66a5b767b1b533f6ce508a125404a2d8e3353c41 (patch) | |
tree | be5905c99c6e86568d5c2209db1c8989e6fd4632 /src/usr/local/www | |
parent | fdcde31b4a910c4e058513c1e3f68a62e722da6b (diff) | |
download | pfsense-66a5b767b1b533f6ce508a125404a2d8e3353c41.zip pfsense-66a5b767b1b533f6ce508a125404a2d8e3353c41.tar.gz |
Avoid invalid arg error when saving WoL widget
when there are no WoL entries
Diffstat (limited to 'src/usr/local/www')
-rw-r--r-- | src/usr/local/www/widgets/widgets/wake_on_lan.widget.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php b/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php index a6a10a5..7f8982f 100644 --- a/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php +++ b/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php @@ -42,8 +42,10 @@ if ($_POST['widgetkey']) { $validNames = array(); - foreach ($config['wol']['wolentry'] as $wolent) { - array_push($validNames, get_wolent_key($wolent)); + if (is_array($config['wol']['wolentry'])) { + foreach ($config['wol']['wolentry'] as $wolent) { + array_push($validNames, get_wolent_key($wolent)); + } } if (is_array($_POST['show'])) { |