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:
bc6ec5e
)
Don't try and load a block with no target; we're not going to find it :D
author
Happy-melon
<happy-melon@users.mediawiki.org>
Tue, 22 Mar 2011 11:45:18 +0000
(11:45 +0000)
committer
Happy-melon
<happy-melon@users.mediawiki.org>
Tue, 22 Mar 2011 11:45:18 +0000
(11:45 +0000)
includes/Block.php
patch
|
blob
|
history
diff --git
a/includes/Block.php
b/includes/Block.php
index
a112be0
..
af28185
100644
(file)
--- a/
includes/Block.php
+++ b/
includes/Block.php
@@
-1098,6
+1098,10
@@
class Block {
if( $type == Block::TYPE_ID || $type == Block::TYPE_AUTO ){
return Block::newFromID( $target );
+ } elseif( $target === null && $vagueTarget === null ){
+ # We're not going to find anything useful here
+ return null;
+
} elseif( in_array( $type, array( Block::TYPE_USER, Block::TYPE_IP, Block::TYPE_RANGE, null ) ) ) {
$block = new Block();
$block->fromMaster( $fromMaster );