Page MenuHomePhabricator

Parser::insertStripItem not generating unique markers per call
Closed, ResolvedPublic

Description

Author: Jared.Williams1

Description:
Browsing r27906 of Parser.php and noticed this bit of code.. (line 586)

/**

  • Add an item to the strip state
  • Returns the unique tag which must be inserted into the stripped text
  • The tag will be replaced with the original text in unstrip() *
  • @private */

function insertStripItem( $text ) {
static $n = 0;
$rnd = "{$this->mUniqPrefix}-item-$n-{$this->mMarkerSuffix}";
$this->mStripState->general->setPair( $rnd, $text );
return $rnd;
}

It appears that $n should be incremented each time its called.


Version: 1.12.x
Severity: minor

Details

Reference
bz12150

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:58 PM
bzimport set Reference to bz12150.
bzimport added a subscriber: Unknown Object (MLST).

I think so. Can someone familiar with the parser comment on this?