From 2c6751b7bb433324884e61386f948629de7e2be0 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Tue, 22 Jul 2008 17:30:11 +0000 Subject: [PATCH] fixed PHP notices --- lam/lib/lamdaemon.inc | 4 ++-- lam/lib/modules/posixAccount.inc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lam/lib/lamdaemon.inc b/lam/lib/lamdaemon.inc index 3bf9db9b..320ea441 100644 --- a/lam/lib/lamdaemon.inc +++ b/lam/lib/lamdaemon.inc @@ -112,11 +112,11 @@ function lamdaemonSSH($commands, $server) { return $return; } $entry = @ldap_get_entries($_SESSION['ldap']->server(), $sr); - $userName = $entry[0]['uid'][0]; - if (!$userName) { + if (!isset($entry[0]['uid'][0])) { $return = array("ERROR," . _("Your LAM admin user must be a valid Unix account to work with lamdaemon!") . ","); return $return; } + $userName = $entry[0]['uid'][0]; if (@ssh2_auth_password($handle, $userName, $credentials[1])) { $shell = ssh2_exec($handle, "sudo " . $_SESSION['config']->get_scriptPath()); fwrite($shell, $commands); diff --git a/lam/lib/modules/posixAccount.inc b/lam/lib/modules/posixAccount.inc index b2113ae4..1521a198 100644 --- a/lam/lib/modules/posixAccount.inc +++ b/lam/lib/modules/posixAccount.inc @@ -612,7 +612,7 @@ class posixAccount extends baseModule { */ function preDeleteActions() { $return = true; - if ($_POST['deletehomedir']) { + if (isset($_POST['deletehomedir'])) { // get list of lamdaemon servers $lamdaemonServers = explode(";", $_SESSION['config']->get_scriptServers()); for ($i = 0; $i < sizeof($lamdaemonServers); $i++) {