diff options
author | jim-p <jimp@netgate.com> | 2019-02-12 10:23:57 -0500 |
---|---|---|
committer | jim-p <jimp@netgate.com> | 2019-02-12 10:24:15 -0500 |
commit | 9524668774c79812df62a6bfd02b68e0f9a0f955 (patch) | |
tree | ce27b61514e39705e89a2aa2ba0d08e5f0d315f4 /src/usr/local/www | |
parent | 51b58d8132efecd08f7834c94fd879ddd6755b37 (diff) | |
download | pfsense-9524668774c79812df62a6bfd02b68e0f9a0f955.zip pfsense-9524668774c79812df62a6bfd02b68e0f9a0f955.tar.gz |
Test $sform before use, fixes #9313
(cherry picked from commit 069585172e6408195b16bbe3090aeba56699ee51)
Diffstat (limited to 'src/usr/local/www')
-rw-r--r-- | src/usr/local/www/firewall_shaper_vinterface.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/usr/local/www/firewall_shaper_vinterface.php b/src/usr/local/www/firewall_shaper_vinterface.php index e52dc46..23f6af4 100644 --- a/src/usr/local/www/firewall_shaper_vinterface.php +++ b/src/usr/local/www/firewall_shaper_vinterface.php @@ -412,12 +412,14 @@ if (!$dfltmsg) { $url = 'firewall_shaper_vinterface.php?pipe='. $pipe . '&action=delete'; } - $sform->addGlobal(new Form_Button( - 'delete', - ($queue && ($qname != $pipe)) ? 'Delete this queue':'Delete Limiter', - $url, - 'fa-trash' - ))->addClass('btn-danger'); + if ($sform) { + $sform->addGlobal(new Form_Button( + 'delete', + ($queue && ($qname != $pipe)) ? 'Delete this queue':'Delete Limiter', + $url, + 'fa-trash' + ))->addClass('btn-danger'); + } } } |