X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2Fcontent%2FContentHandler.php;h=100fa834dc40110bb7db8ded2a0972610552ed6a;hb=7f7efbe026b01be36019c26571224a6e8a178677;hp=48dfc70090c88479f40e64be17514edbbb7c9f71;hpb=a6a6c19c794619c24881d2d984dc18ceb3b6419b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/content/ContentHandler.php b/includes/content/ContentHandler.php index 48dfc70090..100fa834dc 100644 --- a/includes/content/ContentHandler.php +++ b/includes/content/ContentHandler.php @@ -280,8 +280,10 @@ abstract class ContentHandler { } if ( !( $handler instanceof ContentHandler ) ) { - throw new MWException( "$classOrCallback from \$wgContentHandlers is not " . - "compatible with ContentHandler" ); + throw new MWException( + var_export( $classOrCallback, true ) . " from \$wgContentHandlers is not " . + "compatible with ContentHandler" + ); } } @@ -1077,7 +1079,8 @@ abstract class ContentHandler { } // Max content length = max comment length - length of the comment (excl. $1) - $text = $content ? $content->getTextForSummary( 255 - ( strlen( $reason ) - 2 ) ) : ''; + $maxLength = CommentStore::COMMENT_CHARACTER_LIMIT - ( strlen( $reason ) - 2 ); + $text = $content ? $content->getTextForSummary( $maxLength ) : ''; // Now replace the '$1' placeholder $reason = str_replace( '$1', $text, $reason );