Per Tim Starling's comment on bug 41400, I replaced the throw (when a
message parameter is invalid) with a call to trigger_error().
The string [INVALID] is used as a placeholder to make it clear from
the output that an error has occurred.
Change-Id: I974d55d44d392c956e7de6d243da9d8dc07d8833
* @since 1.18
* @param $param String|Array: Parameter as defined in this class.
* @return Tuple(type, value)
- * @throws MWException
*/
protected function extractParam( $param ) {
if ( is_array( $param ) && isset( $param['raw'] ) ) {
} elseif ( !is_array( $param ) ) {
return array( 'before', $param );
} else {
- throw new MWException( "Invalid message parameter: " . serialize( $param ) );
+ trigger_error(
+ "Invalid message parameter: " . htmlspecialchars( serialize( $param ) ),
+ E_USER_WARNING
+ );
+ return array( 'before', '[INVALID]' );
}
}