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:
903677c
)
Revision::newFromTitle() returns null sometimes. Protect against the errors.
author
Sean Colombo
<sean_colombo@users.mediawiki.org>
Thu, 29 Sep 2011 23:11:31 +0000
(23:11 +0000)
committer
Sean Colombo
<sean_colombo@users.mediawiki.org>
Thu, 29 Sep 2011 23:11:31 +0000
(23:11 +0000)
includes/Title.php
patch
|
blob
|
history
diff --git
a/includes/Title.php
b/includes/Title.php
index
b31b87e
..
4868761
100644
(file)
--- a/
includes/Title.php
+++ b/
includes/Title.php
@@
-3575,6
+3575,9
@@
class Title {
}
# Get the article text
$rev = Revision::newFromTitle( $nt );
+ if( !is_object( $rev ) ){
+ return false;
+ }
$text = $rev->getText();
# Does the redirect point to the source?
# Or is it a broken self-redirect, usually caused by namespace collisions?