Skip to content

Commit

Permalink
avoid fatal error in PHP 8 in BAO/Navigation.php
Browse files Browse the repository at this point in the history
  • Loading branch information
sebalis committed Nov 5, 2022
1 parent f004a56 commit c8d4a43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Core/BAO/Navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ public static function orderByWeight(&$navigations) {
if (!isset($b['attributes']['weight'])) {
$b['attributes']['weight'] = 1000;
}
return $a['attributes']['weight'] - $b['attributes']['weight'];
return (int) $a['attributes']['weight'] - (int) $b['attributes']['weight'];
});

// If any of the $navigations have children, recurse
Expand Down

0 comments on commit c8d4a43

Please sign in to comment.