Skip to content

Commit be6ad81

Browse files
committed
GraphPrinter.php: fallback to getWikiValue() if getDisplayTitle() is null
For Page-type objects, use getDisplayTitle() when available; if it returns null or empty, fall back to getWikiValue() to ensure object text is always set.
1 parent 793cbf0 commit be6ad81

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Graph/GraphPrinter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ protected function processResultRow( array $row ) {
216216
$hasProperty = $object->getProperty();
217217

218218
if ( $isPageType ) {
219-
$objectText = $object->getDisplayTitle();
219+
$objectText = $object->getDisplayTitle() ?: $object->getWikiValue();
220220
} else {
221221
$objectText = $object->getWikiValue();
222222
}

0 commit comments

Comments
 (0)