Commit e5f5841e authored by Nicolas Ricklin's avatar Nicolas Ricklin Committed by Greg Boggs
Browse files

Issue #3257776 by Aerzas: PHP 8.1 EasyBreadcrumbBuilder::normalizeText deprecation

parent 2f280556
Loading
Loading
Loading
Loading
+4 −1
Changes for src/EasyBreadcrumbBuilder.php: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -876,13 +876,16 @@ class EasyBreadcrumbBuilder implements BreadcrumbBuilderInterface {
   * E.g., transforms "about-us" to "About Us" or "About us", according to
   * parameters.
   *
   * @param string $raw_text
   * @param string|null $raw_text
   *   Text to be normalized.
   *
   * @return string
   *   Normalized title.
   */
  private function normalizeText($raw_text) {
    if (empty($raw_text)) {
      return '';
    }

    // Transform '-hello--world_javascript-' to 'hello world javascript'.
    $normalized_text = str_replace(['-', '_'], ' ', $raw_text);