diff options
author | jim-p <jimp@pfsense.org> | 2016-01-17 20:42:09 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2016-01-17 20:42:09 -0500 |
commit | eeae21e8630dff8f6ff40752c68a9148f590687d (patch) | |
tree | 429aba5c1130d3caa529773a6dbc371bbdfa606a /src/usr | |
parent | c8a5dfce04e3dfbf02ee9704f09ae45819ef4553 (diff) | |
download | pfsense-eeae21e8630dff8f6ff40752c68a9148f590687d.zip pfsense-eeae21e8630dff8f6ff40752c68a9148f590687d.tar.gz |
Test for an array here to avoid an error if the var isn't an array
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/local/www/pkg_edit.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/usr/local/www/pkg_edit.php b/src/usr/local/www/pkg_edit.php index e6e089a..5dac18f 100644 --- a/src/usr/local/www/pkg_edit.php +++ b/src/usr/local/www/pkg_edit.php @@ -900,6 +900,9 @@ foreach ($pkg['fields']['field'] as $pkga) { eval("\$pkg_source_txt = &$source_url;"); #check if show disable option is present on xml + if (!is_array($pkg_source_txt)) { + $pkg_source_txt = array(); + } if (isset($pkga['show_disable_value'])) { array_push($pkg_source_txt, array(($pkga['source_name']? $pkga['source_name'] : $pkga['name'])=> $pkga['show_disable_value'], ($pkga['source_value']? $pkga['source_value'] : $pkga['value'])=> $pkga['show_disable_value'])); |