From 3aaa01970117032b4f9fc685a56629e0b561758d Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Fri, 2 Sep 2016 10:06:39 +0200 Subject: [PATCH] PHP 5.4 fix --- lam/lib/lamdaemon.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lam/lib/lamdaemon.inc b/lam/lib/lamdaemon.inc index 5ef5d780..6685323d 100644 --- a/lam/lib/lamdaemon.inc +++ b/lam/lib/lamdaemon.inc @@ -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))); }