Page MenuHomePhabricator

ParserFunctions call to mb_substr() generates lots of warnings
Closed, ResolvedPublic

Description

Author: jllwyd

Description:
The mb_substr() call in runSub() in ParserFunctions_body.php does not wrap the $inStart parameter in intval() like the similar call two lines later, leading to lots of error log warnings: "PHP Warning: mb_substr() expects parameter 2 to be long, string given in .../ParserFunctions_body.php on line 670".


Version: REL1_20-branch
Severity: minor

Details

Reference
bz51834

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 2:00 AM
bzimport set Reference to bz51834.
bzimport added a subscriber: Unknown Object (MLST).

After update to MW 1.20.2. on http://offene-naturfuehrer.de we had and have the same issue when running the maintenance script rebuildall.php when it refreshes the links table. I'm not sure if it has to do with the usage of string function {{#sub: }} when there is no length given

Andreas

Change 110582 had a related patch set uploaded by Umherirrender:
mb_substr() expects parameter 2 to be long, string given

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

Change 110582 merged by Anomie:
mb_substr() expects parameter 2 to be long, string given

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

successfully merged