# Messages: usercsspreview, userjspreview, sitecsspreview, sitejspreview
if( $level && $format ) {
$note = "<div id='mw-{$level}{$format}preview'>" . wfMessage( "{$level}{$format}preview" )->text() . "</div>";
- } else {
- $note = wfMessage( 'previewnote' )->text() ;
}
- } else {
- $note = wfMessage( 'previewnote' )->text() ;
}
$rt = $content->getRedirectChain();
} elseif ( !is_array( $param ) ) {
return array( 'before', $param );
} else {
- throw new MWException( "Invalid message parameter" );
+ throw new MWException( "Invalid message parameter: " . serialize( $param ) );
}
}
$list .= "$value";
} elseif ( ( $mode == LIST_AND || $mode == LIST_OR ) && is_array( $value ) ) {
if ( count( $value ) == 0 ) {
- throw new MWException( __METHOD__ . ': empty input' );
+ throw new MWException( __METHOD__ . ": empty input for field $field" );
} elseif ( count( $value ) == 1 ) {
// Special-case single values, as IN isn't terribly efficient
// Don't necessarily assume the single key is 0; we don't