diff options
author | Renato Botelho <renato@netgate.com> | 2016-01-14 17:21:46 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-01-14 17:21:46 -0200 |
commit | d0348fddd8dbb62c394ce45f495e865fbb2aaaef (patch) | |
tree | 768e5b39550e976e601345325174c8f11d4d16fc /src/usr/local/www | |
parent | 21009c99fad3627e80f1d796e85e2e2c919a51ef (diff) | |
download | pfsense-d0348fddd8dbb62c394ce45f495e865fbb2aaaef.zip pfsense-d0348fddd8dbb62c394ce45f495e865fbb2aaaef.tar.gz |
Make sure $code[1] exist
Diffstat (limited to 'src/usr/local/www')
-rw-r--r-- | src/usr/local/www/pkg_mgr_install.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/usr/local/www/pkg_mgr_install.php b/src/usr/local/www/pkg_mgr_install.php index e281952..140ceb3 100644 --- a/src/usr/local/www/pkg_mgr_install.php +++ b/src/usr/local/www/pkg_mgr_install.php @@ -131,7 +131,13 @@ if ($_REQUEST['ajax']) { if (strpos($logline, "__RC=") !== false) { $code = explode(" ", $logline); $rc = str_replace("__RC=", "", $code[0]); - $statusarray['reboot_needed'] = (strpos($code[1], "REBOOT_AFTER") === false) ? "no":"yes"; + + if (count($code) > 1 && + strpos($code[1], "REBOOT_AFTER") !== false) { + $statusarray['reboot_needed'] = "yes"; + } else { + $statusarray['reboot_needed'] = "no"; + } if ($rc == 0) { $logline = gettext("Success") . "\n"; |