diff options
author | Phil Davis <phil@jankaritech.com> | 2017-04-25 18:22:22 +0545 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-04-25 10:55:14 -0300 |
commit | 1ed363656fb44eaec3d801e26ab2da5e02f2d6ba (patch) | |
tree | e331f125b8a3557fc537c04296ae056e643581d1 /src/usr/local/www/widgets | |
parent | f56fb70c0cd9575ecd019ebc122a5888bc1c593f (diff) | |
download | pfsense-1ed363656fb44eaec3d801e26ab2da5e02f2d6ba.zip pfsense-1ed363656fb44eaec3d801e26ab2da5e02f2d6ba.tar.gz |
Avoid invalid arg error when saving WoL widget
when there are no WoL entries
(cherry picked from commit 66a5b767b1b533f6ce508a125404a2d8e3353c41)
Diffstat (limited to 'src/usr/local/www/widgets')
-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 b4d22de..2a5dca1 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 @@ -72,8 +72,10 @@ if ($_POST) { $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'])) { |