Page MenuHomePhabricator

Image history causes "Internal Error" for shared uploads
Closed, ResolvedPublic

Description

Author: lionelbrits

Description:

I have one (recently upgraded) wiki, A, (1.12.0) that is pulling images from a commons wiki C, (1.11.0). Going to the Image: page for native images on A works without a problem, but going to the Image: page using A for images stored on C gives the following dump:

Internal error

wfTimestamp() called with illegal output type.

Backtrace:

#0 /home/.angelina/lionelbrits/physics.thetangentbundle.net/w/includes/filerepo/File.php(1030): wfTimestamp()
#1 /home/.angelina/lionelbrits/physics.thetangentbundle.net/w/includes/ImagePage.php(421): File->getTimestamp(1200871747)
#2 /home/.angelina/lionelbrits/physics.thetangentbundle.net/w/includes/ImagePage.php(87): ImagePage->imageHistory()
#3 /home/.angelina/lionelbrits/physics.thetangentbundle.net/w/includes/Wiki.php(390): ImagePage->view()
#4 /home/.angelina/lionelbrits/physics.thetangentbundle.net/w/includes/Wiki.php(48): MediaWiki->performAction()
#5 /home/.angelina/lionelbrits/physics.thetangentbundle.net/w/index.php(90): MediaWiki->initialize(Object(OutputPage), Object(ImagePage), Object(Title), Object(User), Object(WebRequest))

#6 {main}

Looking around, File.php is calling
return wfTimestamp( filemtime( $path ) );
with a unix timestamp (11110101200871747). For some reason wfTimestamp is setting $outputtype to 11110101200871747, which of course doesn't make sense.
I tried replacing the exception throw with
return gmdate( 'YmdHis', $uts );
as a temporary work-around, and this kicked up an error on line 428 of ImagePage.php. As a final work-around I simply commented out the foreach on that section.

I will upgrade C to 1.12.0 and see if this solves anything, but the problem shows up on A.


Version: 1.12.x
Severity: major

Details

Reference
bz13923

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:09 PM
bzimport set Reference to bz13923.
bzimport added a subscriber: Unknown Object (MLST).
  • This bug has been marked as a duplicate of bug 13649 ***