dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Add CollationFa"
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiFormatPhp.php
diff --git
a/includes/api/ApiFormatPhp.php
b/includes/api/ApiFormatPhp.php
index
fc25f47
..
a744f57
100644
(file)
--- a/
includes/api/ApiFormatPhp.php
+++ b/
includes/api/ApiFormatPhp.php
@@
-55,7
+55,8
@@
class ApiFormatPhp extends ApiFormatBase {
break;
default:
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 ) );
}
$text = serialize( $this->getResult()->getResultData( null, $transforms ) );
@@
-67,11
+68,7
@@
class ApiFormatPhp extends ApiFormatBase {
in_array( 'wfOutputHandler', ob_list_handlers(), true ) &&
preg_match( '/\<\s*cross-domain-policy(?=\s|\>)/i', $text )
) {
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 );
}
$this->printText( $text );