PHP 5.4 fix

This commit is contained in:
Roland Gruber 2016-09-02 10:06:39 +02:00
parent f350424b97
commit 3aaa019701
1 changed files with 2 additions and 2 deletions

View File

@ -103,9 +103,9 @@ function lamLoginSSH($handle) {
}
}
$password = $credentials[1];
if (!empty($_SESSION['config']->getScriptSSHKey())) {
$keyPath = $_SESSION['config']->getScriptSSHKey();
if (!empty($keyPath)) {
// use key authentication
$keyPath = $_SESSION['config']->getScriptSSHKey();
if (!file_exists($keyPath) || !is_readable($keyPath)) {
throw new Exception(sprintf(_("Unable to read %s."), htmlspecialchars($keyPath)));
}