Problem/Motivation
preg_match_all in \Drupal\Core\Utility\Token::scan() now requires that the text to scan is not NULL. Sometimes token_default_tokens_alter() passes a NULL value.
Steps to reproduce
1. content type A has entity reference field to content type B
2. use token in metatag module to output [field_reference_example:entity:url] from content type A
3. open example of content type A where reference field is empty
4. error shown
Proposed resolution
Don't pass NULL values.
Remaining tasks
Patching coming shortly
User interface changes
None
API changes
None
Data model changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3320681-null-sent-to-token-replace-php8.patch | 701 bytes | scott_euser |
Issue fork token-3320681
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Issue fork token_default-3320681
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
scott_euser commentedComment #3
scott_euser commentedOkay I've had to give up on the merge request route; having created the MR originally against the Token module, opening a new fork seems to open it against Token still not Token Default. Patch attached instead.
Comment #5
andy_w commentedComment #6
andy_w commentedComment #7
scott_euser commentedThanks! Would you mind dealing with crediting as well pls
Comment #8
andy_w commented