From 271eb321221637384c8387649a0c9adcd01165a9 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Tue, 3 Dec 2013 22:52:43 +0100 Subject: [PATCH] Set saner default for parameters of LogEventsList::showOptions() Also cast input for Xml::dateMenu(). Change-Id: I28f9184626b01cce4a8080ba3337af0b3f941484 --- includes/logging/LogEventsList.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 ) { -- 2.20.1