mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Do propper check to avoid errors. Reported-by: http://forum.pfsense.org/index.php/topic,22296.0.html
This commit is contained in:
parent
4f64e3b035
commit
c9359d0529
@ -48,9 +48,11 @@ function gentitle_pkg($pgname) {
|
||||
|
||||
function get_pkg_descr($package_name) {
|
||||
global $config;
|
||||
foreach($config['installedpackages']['package'] as $pkg) {
|
||||
if($pkg['name'] == $package_name)
|
||||
return $pkg['descr'];
|
||||
if (is_array($config['installedpackages']['package'])) {
|
||||
foreach($config['installedpackages']['package'] as $pkg) {
|
||||
if($pkg['name'] == $package_name)
|
||||
return $pkg['descr'];
|
||||
}
|
||||
}
|
||||
return "Not available.";
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user