} elseif ( $uri instanceof Uri ) {
$this->setComponents( $uri->getComponents() );
} else {
- throw new MWException( __METHOD__ . ': $uri is not of a valid type.' );
+ throw new MWException( __METHOD__ . ": $uri is not of a valid type." );
}
}
* @return Uri this URI object
*/
public function extendQuery( $parameters ) {
- if ( is_string( $parameters ) ) {
+ if ( !is_array( $parameters ) ) {
$parameters = wfCgiToArray( $parameters );
}