Last modified: 2007-11-30 18:38:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T14150, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 12150 - Parser::insertStripItem not generating unique markers per call
Parser::insertStripItem not generating unique markers per call
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.12.x
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: parser
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-29 21:36 UTC by Jared Williams
Modified: 2007-11-30 18:38 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jared Williams 2007-11-29 21:36:11 UTC
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.
Comment 1 Roan Kattouw 2007-11-29 21:56:27 UTC
I think so. Can someone familiar with the parser comment on this?
Comment 2 Tim Starling 2007-11-30 18:38:08 UTC
Fixed in r27988.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links