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:
ab89e68
)
Fix fatal errors introduced in r36678
author
Roan Kattouw
<catrope@users.mediawiki.org>
Fri, 27 Jun 2008 10:37:40 +0000
(10:37 +0000)
committer
Roan Kattouw
<catrope@users.mediawiki.org>
Fri, 27 Jun 2008 10:37:40 +0000
(10:37 +0000)
includes/api/ApiQueryBase.php
patch
|
blob
|
history
diff --git
a/includes/api/ApiQueryBase.php
b/includes/api/ApiQueryBase.php
index
b17cfab
..
fe68e6f
100644
(file)
--- a/
includes/api/ApiQueryBase.php
+++ b/
includes/api/ApiQueryBase.php
@@
-325,6
+325,8
@@
abstract class ApiQueryBase extends ApiBase {
*/
public static function titleToKey($title) {
$t = Title::newFromText($title);
+ if(!$t)
+ $this->dieUsageMsg('invalidtitle', $title);
return $t->getDbKey();
}
@@
-335,6
+337,9
@@
abstract class ApiQueryBase extends ApiBase {
*/
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();
}