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:
c20f708
)
Merge "Adding sanity check to the LinksUpdate() constructor."
author
Aaron Schulz
<aschulz@wikimedia.org>
Sat, 2 Jun 2012 17:10:19 +0000
(17:10 +0000)
committer
Gerrit Code Review
<gerrit@wikimedia.org>
Sat, 2 Jun 2012 17:10:19 +0000
(17:10 +0000)
includes/LinksUpdate.php
patch
|
blob
|
history
diff --git
a/includes/LinksUpdate.php
b/includes/LinksUpdate.php
index
8b403fc
..
0712ac8
100644
(file)
--- a/
includes/LinksUpdate.php
+++ b/
includes/LinksUpdate.php
@@
-66,6
+66,10
@@
class LinksUpdate extends SqlDataUpdate {
$this->mTitle = $title;
$this->mId = $title->getArticleID();
+ if ( !$this->mId ) {
+ throw new MWException( "The Title object did not provide an article ID. Perhaps the page doesn't exist?" );
+ }
+
$this->mParserOutput = $parserOutput;
$this->mLinks = $parserOutput->getLinks();
$this->mImages = $parserOutput->getImages();