From a9016c40ff57baa2ae83f02254bfea0b72b4e0ed Mon Sep 17 00:00:00 2001 From: Happy-melon Date: Tue, 22 Mar 2011 11:45:18 +0000 Subject: [PATCH] Don't try and load a block with no target; we're not going to find it :D --- includes/Block.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/Block.php b/includes/Block.php index a112be0f92..af28185fdc 100644 --- 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 ); -- 2.20.1