When viewing the details of `Dangerous tags were found in submitted content (fields).` I'm getting the PHP fatal error:
```
TypeError: Argument 1 passed to Drupal\security_review\Checks\Field::getEntityLink() must be an instance of Drupal\Core\Entity\Entity, instance of Drupal\node\Entity\Node given, called in security_review/src/Checks/Field.php on line 141 in Drupal\security_review\Checks\Field->getEntityLink() (line 166 of security_review/src/Checks/Field.php).
```
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | security_review-3127304-2.patch | 682 bytes | douggreen |
Comments
Comment #2
jenlamptonAdding complete issue title.
Comment #3
douggreen commentedWe need to use EntityInterface instead of Entity.
Comment #4
douggreen commentedThis was introduced in the very last commit #2988514: Field check gets fatal error when using Paragraphs (or other entity without edit or canonical routes) but that was 2 years ago.
Comment #5
gregglesThanks for this fix, @douggreen!
Comment #7
gregglesNow committed. Thanks for reporting the issue jenlampton and for fixing it, douggreen!
Comment #12
smustgrave commentedComment #13
gregglesThanks for doing that, smustgrave. To explain the credit, those 3 folks worked on a duplicate issue at #3077541: TypeError: Argument 1 passed to Drupal\security_review\Checks\Field::getEntityLink().