From: Siebrand Mazeland Date: Tue, 3 Dec 2013 21:52:43 +0000 (+0100) Subject: Set saner default for parameters of LogEventsList::showOptions() X-Git-Tag: 1.31.0-rc.0~17758^2 X-Git-Url: http://git.cyclocoop.org//%22javascript:ModifierStyle%28%27%22.%24id.%22%27%29/%22?a=commitdiff_plain;h=271eb321221637384c8387649a0c9adcd01165a9;p=lhc%2Fweb%2Fwiklou.git Set saner default for parameters of LogEventsList::showOptions() Also cast input for Xml::dateMenu(). Change-Id: I28f9184626b01cce4a8080ba3337af0b3f941484 --- diff --git a/includes/logging/LogEventsList.php b/includes/logging/LogEventsList.php index fabe153b20..8aa651152e 100644 --- a/includes/logging/LogEventsList.php +++ b/includes/logging/LogEventsList.php @@ -97,8 +97,9 @@ class LogEventsList extends ContextSource { * @param $filter: array * @param $tagFilter: array? */ - public function showOptions( $types = array(), $user = '', $page = '', $pattern = '', $year = '', - $month = '', $filter = null, $tagFilter = '' ) { + public function showOptions( $types = array(), $user = '', $page = '', $pattern = '', $year = 0, + $month = 0, $filter = null, $tagFilter = '' + ) { global $wgScript, $wgMiserMode; $title = SpecialPage::getTitleFor( 'Log' ); @@ -122,7 +123,7 @@ class LogEventsList extends ContextSource { } // date menu - $html .= Xml::tags( 'p', null, Xml::dateMenu( $year, $month ) ); + $html .= Xml::tags( 'p', null, Xml::dateMenu( (int)$year, (int)$month ) ); // Tag filter if ( $tagSelector ) {