From b72be569bbb38aa8c8cb091726c1d41cffbff254 Mon Sep 17 00:00:00 2001 From: addshore Date: Thu, 24 Mar 2016 10:43:58 +0000 Subject: [PATCH] Cast row namespace to int in SpecialWatchlist Something similar to this recently got through and caused exceptions on mw.org This looks like the same thing, a ns from a db row being handed straight to the TitleValue constructor without being cast. Change-Id: Ic126cd713c5210c9ae3d8e805081849ccf84a7f6 --- includes/specials/SpecialWatchlist.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 2dda093b13..27e5829560 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -382,7 +382,7 @@ class SpecialWatchlist extends ChangesListSpecialPage { } if ( isset( $watchedItemStore ) ) { - $rcTitleValue = new TitleValue( $obj->rc_namespace, $obj->rc_title ); + $rcTitleValue = new TitleValue( (int)$obj->rc_namespace, $obj->rc_title ); $rc->numberofWatchingusers = $watchedItemStore->countWatchers( $rcTitleValue ); } else { $rc->numberofWatchingusers = 0; -- 2.20.1