fix PHP notices

This commit is contained in:
Roland Gruber 2016-12-07 21:17:20 +01:00
parent 502a47ecfa
commit c9008b3c7c
1 changed files with 5 additions and 5 deletions

View File

@ -2175,7 +2175,7 @@ class posixAccount extends baseModule implements passwordService {
} }
// GECOS // GECOS
if (!$this->isBooleanConfigOptionSet('posixAccount_hidegecos')) { if (!$this->isBooleanConfigOptionSet('posixAccount_hidegecos')) {
if ($rawAccount[$ids['posixAccount_gecos']] != "") { if (!empty($rawAccount[$ids['posixAccount_gecos']])) {
if (get_preg($rawAccount[$ids['posixAccount_gecos']], 'gecos')) { if (get_preg($rawAccount[$ids['posixAccount_gecos']], 'gecos')) {
$partialAccounts[$i]['gecos'] = $this->checkASCII($rawAccount[$ids['posixAccount_gecos']]); $partialAccounts[$i]['gecos'] = $this->checkASCII($rawAccount[$ids['posixAccount_gecos']]);
} }
@ -2189,14 +2189,14 @@ class posixAccount extends baseModule implements passwordService {
$gecos = ""; $gecos = "";
if (($rawAccount[$ids['inetOrgPerson_firstName']] != "") && ($rawAccount[$ids['inetOrgPerson_lastName']] != "")) { if (($rawAccount[$ids['inetOrgPerson_firstName']] != "") && ($rawAccount[$ids['inetOrgPerson_lastName']] != "")) {
$gecos = $rawAccount[$ids['inetOrgPerson_firstName']] . " " . $rawAccount[$ids['inetOrgPerson_lastName']]; $gecos = $rawAccount[$ids['inetOrgPerson_firstName']] . " " . $rawAccount[$ids['inetOrgPerson_lastName']];
if ($rawAccount[$ids['inetOrgPerson_telephone']] != "") { if (!empty($rawAccount[$ids['inetOrgPerson_telephone']])) {
$gecos = $gecos . ",," . $rawAccount[$ids['inetOrgPerson_telephone']]; // double "," because room is unknown $gecos = $gecos . ",," . $rawAccount[$ids['inetOrgPerson_telephone']]; // double "," because room is unknown
if ($rawAccount[$ids['inetOrgPerson_fax']] != "") { if (!empty($rawAccount[$ids['inetOrgPerson_fax']])) {
$gecos = $gecos . "," . $rawAccount[$ids['inetOrgPerson_fax']]; $gecos = $gecos . "," . $rawAccount[$ids['inetOrgPerson_fax']];
} }
} }
} }
if ($gecos != "") { if (!empty($gecos)) {
$partialAccounts[$i]['gecos'] = $this->checkASCII($gecos); $partialAccounts[$i]['gecos'] = $this->checkASCII($gecos);
} }
} }
@ -2452,7 +2452,7 @@ class posixAccount extends baseModule implements passwordService {
$temp['dn_gon'][$gonMap[$gons[$g]]][$memberAttr][] = $accounts[$i]['dn']; $temp['dn_gon'][$gonMap[$gons[$g]]][$memberAttr][] = $accounts[$i]['dn'];
} }
} }
if ($dataRow[$col_home] != "") { if (!empty($dataRow[$col_home])) {
$temp['createHomes'][] = $i; $temp['createHomes'][] = $i;
} }
} }