mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/InputBox
synced 2024-09-23 18:29:24 +00:00
Fix "PHP Notice: Array to string conversion" when handling prefix/title params
$params['title'] can be an array if someone has messed with the query parameters. Use WebRequest::getText(), which guarantees strings (and which is already used for 'prefix' earlier in this method). Change-Id: I7b974067fdee22fc42c07fad98af4619fa850269
This commit is contained in:
parent
0ad3ed7bfc
commit
943d505e2e
|
@ -93,11 +93,8 @@ class InputBoxHooks {
|
|||
return true;
|
||||
}
|
||||
|
||||
$title = $request->getText( 'prefix', '' ) . $request->getText( 'title', '' );
|
||||
$params = $request->getValues();
|
||||
$title = $params['prefix'];
|
||||
if ( isset( $params['title'] ) ) {
|
||||
$title .= $params['title'];
|
||||
}
|
||||
unset( $params['prefix'] );
|
||||
$params['title'] = $title;
|
||||
|
||||
|
|
Loading…
Reference in a new issue