Page MenuHomePhabricator

Array to string conversion in TransformationalImageHandler.php:167
Closed, ResolvedPublic

Description

Running PHPUnit tests against PagedTiffHandler for https://gerrit.wikimedia.org/r/#/c/86413 results in different warnings locally to on Jenkins:

root@ubuntu64-web-esxi:/var/www/wiki/mediawiki/core/tests/phpunit# php phpunit.php --with-phpunitdir /var/www/wiki/mediawiki ../../extensionsgit/PagedTiffHandler/tests/PagedTiffHandlerTest.php
Will attempt loading PHPUnit from /var/www/wiki/mediawiki
#!/usr/bin/env php
PHPUnit 4.2.5 by Sebastian Bergmann.

Configuration read from /var/www/wiki/mediawiki/core/tests/phpunit/suite.xml

......E.......E.

Time: 5.6 seconds, Memory: 26.00Mb

There were 2 errors:

  1. PagedTiffHandlerTest::testDoTransform

Array to string conversion

/var/www/wiki/mediawiki/core/includes/media/TransformationalImageHandler.php:167
/var/www/wiki/mediawiki/extensions/PagedTiffHandler/tests/PagedTiffHandlerTest.php:157
/var/www/wiki/mediawiki/core/tests/phpunit/MediaWikiTestCase.php:141

  1. PagedTiffHandlerTest::testTransformNotTooBig

Array to string conversion

/var/www/wiki/mediawiki/core/includes/media/TransformationalImageHandler.php:167
/var/www/wiki/mediawiki/extensions/PagedTiffHandler/tests/PagedTiffHandlerTest.php:278
/var/www/wiki/mediawiki/core/tests/phpunit/MediaWikiTestCase.php:141

FAILURES!
Tests: 16, Assertions: 63, Errors: 2.
root@ubuntu64-web-esxi:/var/www/wiki/mediawiki/core/tests/phpunit#

167 is:

		wfDebug( __METHOD__ . ": creating {$scalerParams['physicalDimensions']} " .
			"thumbnail at $dstPath using scaler $scaler\n" );

$scaler can seemingly be: @return string|Callable One of client, im, custom, gd, imext, or a Callable array


Version: unspecified
Severity: normal

Details

Reference
bz70902

Event Timeline

bzimport raised the priority of this task from to Needs Triage.
bzimport set Reference to bz70902.
bzimport added a subscriber: Unknown Object (MLST).
Reedy created this task.Sep 16 2014, 8:10 PM
Reedy added a comment.Sep 16 2014, 8:11 PM

var_dump-ing $scaler gives:

array(2) {

[0]=>
object(PagedTiffHandler)#620 (0) {
}
[1]=>
string(11) "transformIM"

}

Reedy added a comment.Sep 16 2014, 8:21 PM

Not seemingly caused by https://gerrit.wikimedia.org/r/#/c/147718/ - the code is just moved... So presumably it's actually the extension at fault (issue isn't there with master of PagedTiffHandler, just with 86413 in it)

(In reply to Sam Reed (reedy) from comment #2)

So presumably it's actually the extension at fault

-> moving to its component

Change 160978 had a related patch set uploaded by Reedy:
Array to string conversion in TransformationalImageHandler.php:167

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

Change 160978 merged by jenkins-bot:
Array to string conversion in TransformationalImageHandler.php:167

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

successfully merged

Gilles moved this task from Untriaged to Done on the Multimedia board.Dec 2 2014, 8:53 AM