From 6e427ae635e9a0a3cf82af380c8d7817f1d3b1e9 Mon Sep 17 00:00:00 2001 From: cajus Date: Mon, 17 Mar 2008 10:38:23 +0000 Subject: [PATCH] Fixed PHP error when no HASH is returned when using gosa-si git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9895 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/functions.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index 4d47e5019..786b0f26c 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -2574,8 +2574,12 @@ function generate_smb_nt_hash($password) # Try to use gosa-si? if (isset($config->current['GOSA_SI'])){ - $res= gosaSupportDaemon::send("gosa_gen_smb_hash", "GOSA", array("password" => $password), TRUE); - $hash= $res['XML']['HASH']; + $res= gosaSupportDaemon::send("gosa_gen_smb_hash", "GOSA", array("password" => $password), TRUE); + if (isset($res['XML']['HASH'])){ + $hash= $res['XML']['HASH']; + } else { + $hash= ""; + } } else { $tmp= $config->data['MAIN']['SMBHASH']." ".escapeshellarg($password); @DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__, $tmp, "Execute"); -- 2.30.2