Skip to content

Commit

Permalink
Merge pull request #24178 from demeritcowboy/php81-frontend3
Browse files Browse the repository at this point in the history
[php 8.1 compat] Avoid passing null to strlen
  • Loading branch information
demeritcowboy authored Aug 8, 2022
2 parents 38c5cf6 + 8602938 commit 0fa05f7
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 @@ -860,7 +860,7 @@ public static function getCacheKey($cid) {
$key = Civi::service('settings_manager')
->getBagByContact(NULL, $cid)
->get('navigation');
if (strlen($key) !== self::CACHE_KEY_STRLEN) {
if (strlen($key ?? '') !== self::CACHE_KEY_STRLEN) {
$key = self::resetNavigation($cid);
}
return $key;
Expand Down

0 comments on commit 0fa05f7

Please sign in to comment.