dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
d664ffd
)
Merge "Check for namespace existence in Title::makeTitleSafe()."
author
Aaron Schulz
<aschulz@wikimedia.org>
Wed, 11 Apr 2012 19:44:24 +0000
(19:44 +0000)
committer
Gerrit Code Review
<gerrit@wikimedia.org>
Wed, 11 Apr 2012 19:44:25 +0000
(19:44 +0000)
includes/Title.php
patch
|
blob
|
history
diff --git
a/includes/Title.php
b/includes/Title.php
index
769adb9
..
1876d75
100644
(file)
--- a/
includes/Title.php
+++ b/
includes/Title.php
@@
-317,6
+317,10
@@
class Title {
* @return Title the new object, or NULL on an error
*/
public static function makeTitleSafe( $ns, $title, $fragment = '', $interwiki = '' ) {
+ if ( !MWNamespace::exists( $ns ) ) {
+ return null;
+ }
+
$t = new Title();
$t->mDbkeyform = Title::makeName( $ns, $title, $fragment, $interwiki );
if ( $t->secureAndSplit() ) {