From ee571487755af47db6fe85c72ee7411d4d26e518 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Thu, 6 Jan 2011 15:13:24 +0000 Subject: [PATCH] (bug 26535) Variable naming collision in MessageBlobStore::updateMessage() caused exception ('Non-string key given' in MessageCache) when conflicted updates were retried. --- includes/MessageBlobStore.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/MessageBlobStore.php b/includes/MessageBlobStore.php index d180582d08..5e6c8e5e13 100644 --- a/includes/MessageBlobStore.php +++ b/includes/MessageBlobStore.php @@ -210,7 +210,7 @@ class MessageBlobStore { do { $updates = self::getUpdatesForMessage( $key, $updates ); - foreach ( $updates as $key => $update ) { + foreach ( $updates as $k => $update ) { // Update the row on the condition that it // didn't change since we fetched it by putting // the timestamp in the WHERE clause. @@ -230,7 +230,7 @@ class MessageBlobStore { // fear of getting into an infinite loop if ( !( $success && $dbw->affectedRows() == 0 ) ) { // Not conflicted - unset( $updates[$key] ); + unset( $updates[$k] ); } } } while ( count( $updates ) ); -- 2.20.1