incorrect example code in Token docs

Created on 16 March 2023, over 1 year ago
Updated 24 April 2023, about 1 year ago

API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Utility%2...

The docs say:

return Token::replace($text, $data);

But replace() is not static and calling it like that produces a warning.

The sample code should use \Drupal::token()/

🐛 Bug report
Status

Fixed

Version

9.5

Component
Documentation 

Last updated 29 minutes ago

No maintainer
Created by

🇬🇧United Kingdom joachim

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024