Page MenuHomePhabricator

The #pos parser function will throw E_WARNING if the offset is longer than the string.
Closed, ResolvedPublic

Description

The mb_strpos() function throws E_WARNING if the offset is longer than the length of the string. This change takes the shorter of the two integers.

https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/ParserFunctions/+/473768/

Event Timeline

Alexia created this task.Nov 15 2018, 4:13 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 15 2018, 4:13 PM

Change 473768 had a related patch set uploaded (by Legoktm; owner: Alexia):
[mediawiki/extensions/ParserFunctions@master] The mb_strpos() function throws E_WARNING if the offset is longer than the length of the string.

https://gerrit.wikimedia.org/r/473768

Legoktm assigned this task to Alexia.Dec 20 2018, 3:24 AM
Legoktm added a subscriber: Legoktm.

Should be trivial to backport...

Change 473768 merged by jenkins-bot:
[mediawiki/extensions/ParserFunctions@master] Fix E_WARNING with {{#pos:}} if the offset is larger than the string

https://gerrit.wikimedia.org/r/473768

Change 480898 had a related patch set uploaded (by Legoktm; owner: Alexia):
[mediawiki/extensions/ParserFunctions@REL1_32] Fix E_WARNING with {{#pos:}} if the offset is larger than the string

https://gerrit.wikimedia.org/r/480898

Change 480899 had a related patch set uploaded (by Legoktm; owner: Alexia):
[mediawiki/extensions/ParserFunctions@REL1_31] Fix E_WARNING with {{#pos:}} if the offset is larger than the string

https://gerrit.wikimedia.org/r/480899

Change 480898 merged by jenkins-bot:
[mediawiki/extensions/ParserFunctions@REL1_32] Fix E_WARNING with {{#pos:}} if the offset is larger than the string

https://gerrit.wikimedia.org/r/480898

Change 480899 merged by jenkins-bot:
[mediawiki/extensions/ParserFunctions@REL1_31] Fix E_WARNING with {{#pos:}} if the offset is larger than the string

https://gerrit.wikimedia.org/r/480899

Legoktm closed this task as Resolved.Dec 20 2018, 4:16 AM