break;
default:
- $this->dieUsage( __METHOD__ . ': Unknown value for \'formatversion\'', 'unknownformatversion' );
+ // Should have been caught during parameter validation
+ $this->dieDebug( __METHOD__, 'Unknown value for \'formatversion\'' );
}
$text = serialize( $this->getResult()->getResultData( null, $transforms ) );
- // Bug 66776: wfMangleFlashPolicy() is needed to avoid a nasty bug in
+ // T68776: wfMangleFlashPolicy() is needed to avoid a nasty bug in
// Flash, but what it does isn't friendly for the API. There's nothing
// we can do here that isn't actively broken in some manner, so let's
// just be broken in a useful manner.
in_array( 'wfOutputHandler', ob_list_handlers(), true ) &&
preg_match( '/\<\s*cross-domain-policy(?=\s|\>)/i', $text )
) {
- $this->dieUsage(
- 'This response cannot be represented using format=php. ' .
- 'See https://phabricator.wikimedia.org/T68776',
- 'internalerror'
- );
+ $this->dieWithError( 'apierror-formatphp', 'internalerror' );
}
$this->printText( $text );