Skip to content

Commit

Permalink
Merge branch 'MDL-69474' of https://github.com/stronk7/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
abgreeve committed Mar 16, 2021
2 parents c862a09 + f35e3f0 commit ab8b390
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/outputrenderers.php
Original file line number Diff line number Diff line change
Expand Up @@ -2579,12 +2579,8 @@ protected function render_user_picture(user_picture $userpicture) {
}

// Then wrap it in link if needed. Also we don't wrap it in link if the link redirects to itself.
// It might not return page url in unit test.
if (PHPUNIT_TEST) {
if (!$userpicture->link ) {
return $output;
}
} else if (!$userpicture->link || $this->page->url == $url) {
if (!$userpicture->link ||
($this->page->has_set_url() && $this->page->url == $url)) { // Protect against unset page->url.
return $output;
}

Expand Down

0 comments on commit ab8b390

Please sign in to comment.