- $success = $thumb->streamFile( $headers );
- if ( !$success ) {
- wfThumbError( 500, 'Could not stream the file' );
+ $status = $thumb->streamFileWithStatus( $headers );
+ if ( !$status->isOK() ) {
+ wfThumbError( 500, 'Could not stream the file', null, [
+ 'file' => $thumbName, 'path' => $thumbPath,
+ 'error' => $status->getWikiText( false, false, 'en' ) ] );