summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-11-01 14:13:17 -0400
committerjim-p <jimp@pfsense.org>2010-11-01 14:13:17 -0400
commit08724afa0a323fe5ec04805befbf36b19a67dbed (patch)
treeeb5efb40fce147f4b541b1eec6bdbd05ef952455 /usr
parent5fb9e6d387b6a91406060ca978bef76de8da2a19 (diff)
downloadpfsense-08724afa0a323fe5ec04805befbf36b19a67dbed.zip
pfsense-08724afa0a323fe5ec04805befbf36b19a67dbed.tar.gz
Test for arrays first, should fix #968
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/system_usermanager.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/local/www/system_usermanager.php b/usr/local/www/system_usermanager.php
index c60561f..34fe611 100644
--- a/usr/local/www/system_usermanager.php
+++ b/usr/local/www/system_usermanager.php
@@ -524,7 +524,7 @@ function sshkeyClicked(obj) {
foreach ($config['system']['group'] as $group):
if ($group['gid'] == 1998) /* all users group */
continue;
- if (in_array($group['name'],$pconfig['groups']))
+ if (is_array($pconfig['groups']) && in_array($group['name'],$pconfig['groups']))
continue;
?>
<option value="<?=$group['name'];?>" <?=$selected;?>>
@@ -549,6 +549,7 @@ function sshkeyClicked(obj) {
<br/>
<select size="10" style="width: 75%" name="groups[]" class="formselect" id="groups" onChange="clear_selected('nogroups')" multiple>
<?php
+ if (is_array($pconfig['groups'])) {
foreach ($config['system']['group'] as $group):
if ($group['gid'] == 1998) /* all users group */
continue;
@@ -558,7 +559,8 @@ function sshkeyClicked(obj) {
<option value="<?=$group['name'];?>">
<?=htmlspecialchars($group['name']);?>
</option>
- <?php endforeach; ?>
+ <?php endforeach;
+ } ?>
</select>
<br/>
</td>
OpenPOWER on IntegriCloud