From e1d01b4d7bde769f4bf370b409065b90fbfffff8 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Tue, 7 Jun 2011 18:13:21 +0000 Subject: [PATCH] Fix (Api)BlockTest for Sqlite. getRangeStart()/getRangeEnd() were returning null for user blocks, which was then happily inserted into a NOT NULL column. The IGNORE was just masking the real error. Thanks Brion and MaxSem. Oh, and ping r84475 --- includes/Block.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Block.php b/includes/Block.php index fb294f1fb0..2856824925 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -703,7 +703,7 @@ class Block { public function getRangeStart() { switch( $this->type ) { case self::TYPE_USER: - return null; + return ''; case self::TYPE_IP: return IP::toHex( $this->target ); case self::TYPE_RANGE: @@ -720,7 +720,7 @@ class Block { public function getRangeEnd() { switch( $this->type ) { case self::TYPE_USER: - return null; + return ''; case self::TYPE_IP: return IP::toHex( $this->target ); case self::TYPE_RANGE: -- 2.20.1