Index: trunk/extensions/CodeReview/backend/CodeCommentLinker.php |
— | — | @@ -26,7 +26,7 @@ |
27 | 27 | * Note: tries to fix broken HTML with MWTidy |
28 | 28 | * @TODO: cleanup and move to language.php |
29 | 29 | * @param string $text |
30 | | - * @param int $maxLen |
| 30 | + * @param int $maxLen (zero/positive) |
31 | 31 | * @param string $ellipsis |
32 | 32 | * @returns string |
33 | 33 | */ |
— | — | @@ -97,6 +97,9 @@ |
98 | 98 | } |
99 | 99 | } |
100 | 100 | } |
| 101 | + if( $displayLen == 0 ) { |
| 102 | + return ''; // no text shown, nothing to format |
| 103 | + } |
101 | 104 | self::onEndBracket( $tag, $lastCh, $tagType, $openTags ); // for bad HTML |
102 | 105 | while ( count( $openTags ) > 0 ) { |
103 | 106 | $ret .= '</' . array_pop($openTags) . '>'; // close open tags |