Drupal 9 latest #132

Merged
MegaKeegMan merged 13 commits from drupal9-latest into master 2024-02-16 23:55:40 +00:00
Showing only changes of commit 7c654e2dd5 - Show all commits

View file

@ -16,7 +16,7 @@ function geofresco_preprocess_page_title(&$variables) {
return;
}
$string = isset($variables['title']['#markup']) ? $variables['title']['#markup'] : FALSE;
if ($string && $pos = strpos($string, "'s blog", -7)) {
if ($string && strlen($string) > 7 && $pos = strpos($string, "'s blog", -7)) {
$uid = substr($string, 0, $pos);
if (is_numeric($uid) && $account = \Drupal\user\Entity\User::load($uid)) {
$variables['title'] = [