From ca76554f10bcafec985a2b27a65ed61787e64fb4 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Fri, 10 Oct 2008 18:15:53 +0000 Subject: [PATCH] Fix invalid SQL, per bug #15836 --- includes/specials/SpecialAllpages.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/includes/specials/SpecialAllpages.php b/includes/specials/SpecialAllpages.php index b7acb36c47..1dc9be14c2 100644 --- a/includes/specials/SpecialAllpages.php +++ b/includes/specials/SpecialAllpages.php @@ -153,10 +153,9 @@ class SpecialAllpages extends IncludableSpecialPage { $done = false; while( !$done ) { // Fetch the last title of this chunk and the first of the next - $chunk = is_null( $lastTitle ) - ? '' - : 'page_title >= ' . $dbr->addQuotes( $lastTitle ); - $chunk = array($chunk); + $chunk = ( $lastTitle === false ) + ? array() + : array( 'page_title >= ' . $dbr->addQuotes( $lastTitle ) ); $res = $dbr->select( 'page', /* FROM */ 'page_title', /* WHAT */ array_merge($where,$chunk), -- 2.20.1