r91938 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91937‎ | r91938 | r91939 >
Date:07:39, 12 July 2011
Author:ning
Status:deferred
Tags:
Comment:
bug: list view parser doesn't handle page end char
Modified paths:
  • /trunk/extensions/WikiObjectModel/includes/parsers/WOMListItemParser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiObjectModel/includes/parsers/WOMListItemParser.php
@@ -33,7 +33,8 @@
3434 if ( !$obj instanceof WOMListItemModel )
3535 return false;
3636
37 - if ( ( strlen( $text ) >= $offset + 1 ) && $text { $offset } == "\n" ) {
 37+ $len = strlen( $text );
 38+ if ( ( $offset >= $len ) || ( ( $len >= $offset + 1 ) && $text { $offset } == "\n" ) ) {
3839 return 0;
3940 }
4041

Status & tagging log