Page MenuHomePhabricator

Ensure change from git a0a27f5 is applied to extension/src/Config/SiteConfig as well
Closed, ResolvedPublicBUG REPORT


What it says on the tin.

Event Timeline

ssastry created this task.Aug 1 2019, 2:46 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 1 2019, 2:46 AM
ssastry triaged this task as Medium priority.Aug 1 2019, 2:46 AM
ssastry moved this task from Backlog to Bugs on the Parsoid-PHP board.
ssastry changed the subtype of this task from "Task" to "Bug Report".
Arlolra closed this task as Resolved.Aug 5 2019, 11:16 PM
Arlolra claimed this task.
Arlolra added a subscriber: Arlolra.

The extension implementation is as follow,

	/** @inheritDoc */
	public function getParameterizedAliasMatcher( array $words ): callable {
		$words = MediaWikiServices::getInstance()->getMagicWordFactory()
			->newArray( $words );
		return function ( $text ) use ( $words ) {
			$ret = $words->matchVariableStartToEnd( $text );
			if ( $ret[0] === false ) {
				return null;
			} else {
				return [ 'k' => $ret[0], 'v' => $ret[1] ];

parseMatch used in matchVariableStartToEnd says wrt to $ret[1],

  • If there is no parameter value, that element will be false.

but that's only if the magic word isn't parameterized. Since our function here is getParameterizedAliasMatcher, that shouldn't be an issue. Otherwise, it doesn't look like it has a problem capturing the empty string as a value, as in the fix referenced in the title.