--- src/Checks/Field.php
+++ src/Checks/Field.php
@@ -86,7 +86,7 @@ class Field extends Check {
/** @var TypedDataInterface $property */
$value = $property->getValue();
if (is_string($value)) {
- $field_name = $property->getDataDefinition()->getLabel();
+ $field_name = $item->getFieldDefinition()->getLabel();
foreach ($tags as $vulnerability => $tag) {
if (strpos($value, '<' . $tag) !== FALSE) {
// Vulnerability found.
@@ -138,9 +138,9 @@ class Field extends Check {
->load($entity_id);
foreach ($fields as $field => $finding) {
- $url = $entity->urlInfo('edit-form');
+ $url = $entity->toUrl('edit-form')->toString();
if ($url === NULL) {
- $url = $entity->urlInfo();
+ $url = $entity->toUrl()->toString();
}
$items[] = $this->t(
'@vulnerabilities found in @field field of @label',