From 6286ac2971267b1ce8314ca6d8b1e752fa53f057 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 15 Jun 2011 20:42:16 +0000 Subject: [PATCH] Another partial fix for Block test: update $this->mId on successful Block::insert() --- includes/Block.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/Block.php b/includes/Block.php index 280552b5fd..5afe5c55a6 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -415,10 +415,11 @@ class Block { array( 'IGNORE' ) ); $affected = $dbw->affectedRows(); + $this->mId = $dbw->insertId(); if ( $affected ) { $auto_ipd_ids = $this->doRetroactiveAutoblock(); - return array( 'id' => $ipb_id, 'autoIds' => $auto_ipd_ids ); + return array( 'id' => $this->mId, 'autoIds' => $auto_ipd_ids ); } return false; -- 2.20.1