dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f28260
)
Make Title::newFromIDs() work properly when given an empty array.
author
Tim Starling
<tstarling@users.mediawiki.org>
Thu, 17 Jan 2008 12:33:35 +0000
(12:33 +0000)
committer
Tim Starling
<tstarling@users.mediawiki.org>
Thu, 17 Jan 2008 12:33:35 +0000
(12:33 +0000)
includes/Title.php
patch
|
blob
|
history
diff --git
a/includes/Title.php
b/includes/Title.php
index
7ae2a67
..
7ff1db9
100644
(file)
--- a/
includes/Title.php
+++ b/
includes/Title.php
@@
-207,6
+207,9
@@
class Title {
* Make an array of titles from an array of IDs
*/
public static function newFromIDs( $ids ) {
+ if ( !count( $ids ) ) {
+ return array();
+ }
$dbr = wfGetDB( DB_SLAVE );
$res = $dbr->select( 'page', array( 'page_namespace', 'page_title' ),
'page_id IN (' . $dbr->makeList( $ids ) . ')', __METHOD__ );