Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Mediawiki-CVS

SVN: [36719] trunk/phase3/includes/api/ApiQueryBase.php

 

 

Wikipedia mediawiki-cvs RSS feed   Index | Next | Previous | View Threaded


catrope at svn

Jun 27, 2008, 3:37 AM

Post #1 of 1 (49 views)
Permalink
SVN: [36719] trunk/phase3/includes/api/ApiQueryBase.php

Revision: 36719
Author: catrope
Date: 2008-06-27 10:37:40 +0000 (Fri, 27 Jun 2008)

Log Message:
-----------
Fix fatal errors introduced in r36678

Modified Paths:
--------------
trunk/phase3/includes/api/ApiQueryBase.php

Modified: trunk/phase3/includes/api/ApiQueryBase.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryBase.php 2008-06-27 10:24:00 UTC (rev 36718)
+++ trunk/phase3/includes/api/ApiQueryBase.php 2008-06-27 10:37:40 UTC (rev 36719)
@@ -325,6 +325,8 @@
*/
public static function titleToKey($title) {
$t = Title::newFromText($title);
+ if(!$t)
+ $this->dieUsageMsg('invalidtitle', $title);
return $t->getDbKey();
}

@@ -335,6 +337,9 @@
*/
public static function keyToTitle($key) {
$t = Title::newFromDbKey($key);
+ # This really shouldn't happen but we gotta check anyway
+ if(!$t)
+ $this->dieUsageMsg('invalidtitle', $key);
return $t->getPrefixedText();
}




_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS[at]lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Wikipedia mediawiki-cvs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.