diff --git a/src/etc/inc/auth.inc b/src/etc/inc/auth.inc index ec662af1d..f102ce508 100644 --- a/src/etc/inc/auth.inc +++ b/src/etc/inc/auth.inc @@ -239,6 +239,8 @@ function index_users() { global $config; + $userindex = array(); + if (is_array($config['system']['user'])) { $i = 0; foreach($config['system']['user'] as $userent) { @@ -247,7 +249,7 @@ function index_users() } } - return ($userindex); + return $userindex; } function &getUserEntry($name) @@ -283,6 +285,8 @@ function &getGroupEntry($name) if (isset($groupindex[$name])) { return $config['system']['group'][$groupindex[$name]]; } + + return array(); } function &getGroupEntryByGID($gid) @@ -360,7 +364,6 @@ function local_sync_accounts() } /* remove local groups to avoid gid conflicts */ - $gids = array(); $fd = popen('/usr/sbin/pw groupshow -a', 'r'); if ($fd) { while (!feof($fd)) { @@ -606,9 +609,9 @@ function local_group_del_user($user) function local_group_set($group, $reset = false) { if (!isset($group['name']) || !isset($group['gid'])) { - // input data invalid - return false; + return; } + $group_name = $group['name']; $group_gid = $group['gid']; $group_members = ''; @@ -721,6 +724,8 @@ function auth_get_authserver($name) } } } + + return false; } function auth_get_authserver_list() diff --git a/src/etc/inc/config.lib.inc b/src/etc/inc/config.lib.inc index 8fef71ec0..4b2a8941f 100644 --- a/src/etc/inc/config.lib.inc +++ b/src/etc/inc/config.lib.inc @@ -279,7 +279,6 @@ function security_checks_disabled() function cleanup_backups() { global $config; - $i = false; if (isset($config['system']['backupcount']) && is_numeric($config['system']['backupcount']) && ($config['system']['backupcount'] >= 0)) { $revisions = intval($config['system']['backupcount']); @@ -301,8 +300,6 @@ function cleanup_backups() function make_config_revision_entry($desc = '') { - global $config; - if (!empty($_SESSION['Username'])) { $username = $_SESSION['Username']; } else { diff --git a/src/etc/inc/interfaces.lib.inc b/src/etc/inc/interfaces.lib.inc index 0e5427d48..1b5e4eb4f 100644 --- a/src/etc/inc/interfaces.lib.inc +++ b/src/etc/inc/interfaces.lib.inc @@ -196,7 +196,6 @@ function legacy_interface_stats($ifs=null) /** * detect interface capabilities using ifconfig -m - * @param $intf filter on interface name (empty for all) * @return array list of interface specifics indexed by physical interface name */ function legacy_interfaces_details($intf = null) @@ -276,7 +275,7 @@ function legacy_interfaces_details($intf = null) /** * fetch interface details for one interface - * @param $intf interface name + * @param $intf string interface name * @return array list of interface specifics */ function legacy_interface_details($intf)