Skip to content

Commit 3cb4331

Browse files
Add null check
1 parent 6b2861c commit 3cb4331

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

MediaWikiUserpageCustomField.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ public function renderPropertyViewLabel() {
6767

6868
public function renderPropertyViewValue( array $handles ) {
6969
$account = $this->getExternalAccount();
70+
71+
if ( $account === null ) {
72+
return pht( 'Unknown' );
73+
}
74+
7075
$uri = $account->getAccountURI();
7176

7277
if ( !$account || !strlen( $uri ) ) {

0 commit comments

Comments
 (0)