Page MenuHomePhabricator

"PHP Notice: Undefined index: width", "…height" in ThumbnailImage.php while running PHPUnit tests
Closed, ResolvedPublic

Description

Spotted while reviewing an unrelated test failure: https://integration.wikimedia.org/ci/job/mediawiki-quibble-vendor-sqlite-php74/719/console

16:13:54 INFO:quibble.commands:composer run --timeout=0 phpunit:entrypoint -- --group Database --exclude-group Broken,ParserFuzz,Stub,Standalone
16:13:55 > phpunit '--group' 'Database' '--exclude-group' 'Broken,ParserFuzz,Stub,Standalone'
16:13:55 Using PHP 7.4.33
16:13:55 Running with MediaWiki settings because there might be integration tests
16:13:56 PHP Notice:  Undefined index: width in /workspace/src/includes/media/ThumbnailImage.php on line 79
16:13:56 PHP Notice:  Undefined index: height in /workspace/src/includes/media/ThumbnailImage.php on line 80
16:13:59 PHPUnit 9.6.19 by Sebastian Bergmann and contributors.

Event Timeline

I'm guessing from the peculiar output that the notice is emitted by some test provider.

Change #1031510 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@master] ThumbnailEntryPointTest: Fix PHP notice in data provider

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

Change #1031510 merged by jenkins-bot:

[mediawiki/core@master] ThumbnailEntryPointTest: Fix PHP notice in data provider

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