From: Marius Hoch Date: Wed, 25 May 2016 19:25:12 +0000 (+0200) Subject: Param &$html for the "LinkBegin" hook needs to be null if $text is null X-Git-Tag: 1.31.0-rc.0~6825^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=c28a661408709ab5086e7c74c9472c82e7ef9115;p=lhc%2Fweb%2Fwiklou.git Param &$html for the "LinkBegin" hook needs to be null if $text is null To keep b/c with the old implementation. Change-Id: I5fff92f47babe890fe0d3726dba6f60cc75ee708 --- diff --git a/includes/linker/LinkRenderer.php b/includes/linker/LinkRenderer.php index 026136599c..cb3accebee 100644 --- a/includes/linker/LinkRenderer.php +++ b/includes/linker/LinkRenderer.php @@ -213,7 +213,11 @@ class LinkRenderer { $ret = null; $dummy = new DummyLinker(); $title = Title::newFromLinkTarget( $target ); - $realHtml = $html = HtmlArmor::getHtml( $text ); + if ( $text !== null ) { + $realHtml = $html = HtmlArmor::getHtml( $text ); + } else { + $realHtml = $html = null; + } if ( !Hooks::run( 'LinkBegin', [ $dummy, $title, &$html, &$extraAttribs, &$query, &$options, &$ret ] ) ) {