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:
a2a9b46
)
catch exceptions while generating auto delete reason
author
Daniel Kinzler
<daniel.kinzler@wikimedia.de>
Wed, 28 Mar 2012 13:09:21 +0000
(13:09 +0000)
committer
Daniel Kinzler
<daniel.kinzler@wikimedia.de>
Wed, 4 Apr 2012 18:00:05 +0000
(20:00 +0200)
includes/Article.php
patch
|
blob
|
history
diff --git
a/includes/Article.php
b/includes/Article.php
index
249d48f
..
5470dbc
100644
(file)
--- a/
includes/Article.php
+++ b/
includes/Article.php
@@
-1384,7
+1384,13
@@
class Article extends Page {
// Generate deletion reason
$hasHistory = false;
if ( !$reason ) {
- $reason = $this->generateReason( $hasHistory );
+ try {
+ $reason = $this->generateReason( $hasHistory );
+ } catch (MWException $e) {
+ # if a page is horribly broken, we still want to be able to delete it. so be lenient about errors here.
+ wfDebug("Error while building auto delete summary: $e");
+ $reason = '';
+ }
}
// If the page has a history, insert a warning