From: addshore Date: Thu, 24 Mar 2016 10:43:58 +0000 (+0000) Subject: Cast row namespace to int in SpecialWatchlist X-Git-Tag: 1.31.0-rc.0~7526^2 X-Git-Url: https://git.cyclocoop.org/admin/%7B%7Blocalurl:Special:UserLogin%7D%7D?a=commitdiff_plain;h=b72be569bbb38aa8c8cb091726c1d41cffbff254;p=lhc%2Fweb%2Fwiklou.git 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 --- 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;