Page MenuHomePhabricator

Typo in Loops extension for 1.28.0
Closed, ResolvedPublic

Description

I found this bug in the Loops extension while upgrading Mediawiki from 1.27.1 to 1.28.0

To reproduce the bug, loop over 100 times:

{{#loop: counter
  | 1
  | 101
  | <nowiki/>
{{#var:counter}}
}}

Actual Result is an error: [adb78e11d1356ec816bc8e1c] /w/index.php?title=User:Pfarrar/sandbox&action=submit Error from line 360 of /home/wiki/wiki/wiki/extensions/Loops/Loops.php: Call to undefined method Message::escape()

Expected 'loops_max' message ("Maximum number of loops have been performed").

I was able to fix this in Loops.php line 360.

360c360
<               return $output .= '<div class="error">' . wfMessage( 'loops_max' )->inContentLanguage()->escape() . '</div>';
---
>               return $output .= '<div class="error">' . wfMessage( 'loops_max' )->inContentLanguage()->escaped() . '</div>';

Event Timeline

Change 330327 had a related patch set uploaded (by SamanthaNguyen):
Fix a typo for escaped method, remove deprecated i18n file

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

Change 330327 merged by jenkins-bot:
Fix a typo for escaped method, remove deprecated i18n file

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

SamanthaNguyen removed a project: Patch-For-Review.
SamanthaNguyen moved this task from Backlog to Done on the good first task board.