Skip to content

Commit

Permalink
Merge pull request #4795 from christoph-daehne/4794-could-not-be-conv…
Browse files Browse the repository at this point in the history
…erted-to-string

BUGFIX: node:repair fails with could not be converted to string
  • Loading branch information
kitsunet authored Dec 20, 2023
2 parents 08f9dff + 1ea904d commit f760cf4
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,16 @@ public function removeBrokenEntityReferences($workspaceName)
$convertedProperty->__load();
} /** @noinspection PhpRedundantCatchClauseInspection */ catch (EntityNotFoundException $e) {
$nodesWithBrokenEntityReferences[$nodeData->getIdentifier()][$propertyName] = $nodeData;
$this->dispatch(self::EVENT_NOTICE, sprintf('Broken reference in "<i>%s</i>" (%s), property "<i>%s</i>" (<i>%s</i>) referring to <i>%s</i>.', $nodeData->getPath(), $nodeData->getIdentifier(), $propertyName, $propertyType, $propertyValue));
$this->dispatch(self::EVENT_NOTICE, sprintf(
'Broken reference in "<i>%s</i>" (%s), property "<i>%s</i>" (<i>%s</i>)%s.',
$nodeData->getPath(),
$nodeData->getIdentifier(),
$propertyName,
$propertyType,
method_exists($propertyValue, '__toString') ?
' referring to <i>' . $propertyValue->__toString() . '</i>' :
''
));
$brokenReferencesCount ++;
}
}
Expand Down

0 comments on commit f760cf4

Please sign in to comment.