From: Brion Vibber Date: Tue, 20 Sep 2005 01:02:51 +0000 (+0000) Subject: * (bug 3506) Avoid MySQL error when Listusers returns no results X-Git-Tag: 1.6.0~1599 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=ee967e899dfe9d548c6eb1209469143cefda7244;p=lhc%2Fweb%2Fwiklou.git * (bug 3506) Avoid MySQL error when Listusers returns no results Bug introduced in SpecialListusers.php rev 1.36: http://cvs.sourceforge.net/viewcvs.py/wikipedia/phase3/includes/SpecialListusers.php?r1=1.35&r2=1.36 --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a8664b1b2a..72bc19d27b 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -117,6 +117,7 @@ fully support the editing toolbar, but was found to be too confusing. * (bug 2570) Add 'watch this page' checkbox on uploads, watch uploads by default when 'watchdefault' option is on * Skip update of disused 'rc_cur_time' field (todo: discard the field) +* (bug 3506) Avoid MySQL error when Listusers returns no results === Caveats === diff --git a/includes/SpecialListusers.php b/includes/SpecialListusers.php index dabe6fb1b6..fc664e05a4 100644 --- a/includes/SpecialListusers.php +++ b/includes/SpecialListusers.php @@ -66,7 +66,10 @@ class ListUsersPage extends QueryPage { $batch->execute( $wgLinkCache ); // Back to start for display - $db->dataSeek( $res, 0 ); + if( $db->numRows( $res ) > 0 ) { + // If there are no rows we get an error seeking. + $db->dataSeek( $res, 0 ); + } } /**