Skip to content

Commit

Permalink
Ticket #4573 - PHP 8.2 compatibility issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonLV committed Dec 7, 2023
1 parent a8c8a78 commit 754b95e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion inc/classes/BxDolAcl.php
Expand Up @@ -226,7 +226,7 @@ public function isMemberLevelInSet($mixedPermissions, $iProfileId = false)
$iPermissions = 0;
if(is_array($mixedPermissions))
foreach($mixedPermissions as $iPermissionId)
$iPermissions += pow(2, $iPermissionId - 1);
$iPermissions += pow(2, (int)$iPermissionId - 1);
else if(is_numeric($mixedPermissions))
$iPermissions = (int)$mixedPermissions;

Expand Down
5 changes: 3 additions & 2 deletions inc/classes/BxDolPrivacyQuery.php
Expand Up @@ -244,8 +244,9 @@ public function getGroupCustom($aParams)
WHERE 1" . $sWhereClause . " " . $sGroupClause . " " . $sOrderClause . " " . $sLimitClause;

$aResult = call_user_func_array(array($this, $aMethod['name']), $aMethod['params']);
if(in_array($aParams['type'], array('id_ext', 'pcog_ext')) && !empty($aResult) && is_array($aResult))
$aResult['items'] = explode($sDiv, $aResult['items']);

if(in_array($aParams['type'], ['id_ext', 'pcog_ext']) && !empty($aResult) && is_array($aResult))
$aResult['items'] = !empty($aResult['items']) ? explode($sDiv, $aResult['items']) : [];

return $aResult;
}
Expand Down

0 comments on commit 754b95e

Please sign in to comment.