warn and continue gracefully if bcmath is not installed
This commit is contained in:
parent
e391108ebc
commit
ebee3543ce
|
@ -1298,6 +1298,12 @@ class Access extends LDAPUtility implements user\IUserTools {
|
||||||
*/
|
*/
|
||||||
public function convertSID2Str($sid) {
|
public function convertSID2Str($sid) {
|
||||||
try {
|
try {
|
||||||
|
if(!function_exists('bcadd')) {
|
||||||
|
\OCP\Util::writeLog('user_ldap',
|
||||||
|
'You need to install bcmath module for PHP to have support ' .
|
||||||
|
'for AD primary groups', \OCP\Util::WARN);
|
||||||
|
throw new \Excpetion('missing bcmath module');
|
||||||
|
}
|
||||||
$srl = ord($sid[0]);
|
$srl = ord($sid[0]);
|
||||||
$numberSubID = ord($sid[1]);
|
$numberSubID = ord($sid[1]);
|
||||||
$x = substr($sid, 2, 6);
|
$x = substr($sid, 2, 6);
|
||||||
|
|
Loading…
Reference in New Issue