From 632d3a26bdf70aa5b27b04ab9b447c35e3596af2 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Mon, 30 Apr 2018 19:29:31 +0200 Subject: [PATCH] PHP 7.2 compatibility --- lam/lib/modules/sambaSamAccount.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lam/lib/modules/sambaSamAccount.inc b/lam/lib/modules/sambaSamAccount.inc index 32238a47..736d9ce3 100644 --- a/lam/lib/modules/sambaSamAccount.inc +++ b/lam/lib/modules/sambaSamAccount.inc @@ -2240,9 +2240,9 @@ class sambaSamAccount extends baseModule implements passwordService { // passwords ( = host name) $partialAccounts[$i]['sambaPwdLastSet'] = time(); if (isset($this->moduleSettings['sambaSamAccount_lmHash'][0]) && ($this->moduleSettings['sambaSamAccount_lmHash'][0] == 'no')) { - $partialAccounts[$i]['sambaLMPassword'] = lmPassword(substr($partialAccounts[$i]['uid'], 0, sizeof($partialAccounts[$i]['uid']) - 1)); + $partialAccounts[$i]['sambaLMPassword'] = lmPassword(substr($partialAccounts[$i]['uid'], 0, strlen($partialAccounts[$i]['uid']) - 1)); } - $partialAccounts[$i]['sambaNTPassword'] = ntPassword(substr($partialAccounts[$i]['uid'], 0, sizeof($partialAccounts[$i]['uid']) - 1)); + $partialAccounts[$i]['sambaNTPassword'] = ntPassword(substr($partialAccounts[$i]['uid'], 0, strlen($partialAccounts[$i]['uid']) - 1)); // flags $partialAccounts[$i]['sambaAcctFlags'] = "[W ]"; }