As format=rawfm is intended for debugging, a recent change removed
definition of unnecessary parameters inherited from format=json. But the
inherited code was still assuming they were defined, causing PHP
warnings.
Bug: T96479
Change-Id: Id13ae541f13b6930c535d156dc5aac0a257d31e8
public function getMimeType() {
$params = $this->extractRequestParams();
// callback:
public function getMimeType() {
$params = $this->extractRequestParams();
// callback:
- if ( $params['callback'] ) {
+ if ( isset( $params['callback'] ) ) {
return 'text/javascript';
}
return 'text/javascript';
}
- $callback = $params['callback'];
- if ( $callback !== null ) {
- $callback = preg_replace( "/[^][.\\'\\\"_A-Za-z0-9]/", '', $callback );
+ if ( isset( $params['callback'] ) ) {
+ $callback = preg_replace( "/[^][.\\'\\\"_A-Za-z0-9]/", '', $params['callback'] );
# Prepend a comment to try to avoid attacks against content
# sniffers, such as bug 68187.
$this->printText( "/**/$callback($json)" );
# Prepend a comment to try to avoid attacks against content
# sniffers, such as bug 68187.
$this->printText( "/**/$callback($json)" );