r103834 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103833‎ | r103834 | r103835 >
Date:21:09, 21 November 2011
Author:sean_colombo
Status:reverted (Comments)
Tags:
Comment:
ParserFunctions: made #sub stronger against bad params (was throwing a ton of warnings in production at Wikia).
Modified paths:
  • /trunk/extensions/ParserFunctions/ParserFunctions_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ParserFunctions/ParserFunctions_body.php
@@ -693,6 +693,7 @@
694694 if ( intval( $inLength ) == 0 ) {
695695 $result = mb_substr( $inStr, $inStart );
696696 } else {
 697+ $inStart = intval( $inStart ); // prevents warnings when inStart is an empty string
697698 $result = mb_substr( $inStr, $inStart, $inLength );
698699 }
699700

Follow-up revisions

RevisionCommit summaryAuthorDate
r103836ParserFunctions: The third param turned out to have the same issue as the sec...sean_colombo21:18, 21 November 2011

Comments

#Comment by SColombo~mediawikiwiki (talk | contribs)   21:18, 21 November 2011

See r103836 instead.

Status & tagging log