Page MenuHomePhabricator

TypeError: substr(): Argument #1 ($string) must be of type string, array given
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
  • service.version: 1.46.0-wmf.19
  • timestamp: 2026-03-17T13:19:42.770Z
  • labels.phpversion: 8.3.30
  • trace.id: b908aaec-4e6b-4765-8f77-32260409024e
  • Find trace.id in Logstash
labels.normalized_message
[{reqId}] {exception_url}   TypeError: substr(): Argument #1 ($string) must be of type string, array given
Impact

Low

Notes

This is GIGO as the related URLs were explicitly constructed like
https://commons.wikimedia.org/w/thumb.php?f=example.jpg&w[%24testing]=1
or
https://commons.wikimedia.org/w/thumb.php?f=example.jpg&w[]=180

See also very similar / dup T420461: PHP Warning: Array to string conversion (in PDFHandler)

Details

MediaWiki Version
1.46.0-wmf.19
Request URL
https://commons.wikimedia.org/w/thumb.php?f=*&w%5B%24eq%5D=*
Related Changes in Gerrit:

Event Timeline

Aklapper triaged this task as Low priority.

Change #1260652 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/core@master] Ignore unexpected …&param[]=… array params in ThumbnailEntryPoint

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

Change #1260652 merged by jenkins-bot:

[mediawiki/core@master] Ignore unexpected …&param[]=… array params in ThumbnailEntryPoint

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