Issue #3406137 by endless_wander: Empty variable not permitted in PHP 8 str_replace if event registration is not limited to any roles