From: Roan Kattouw Date: Thu, 6 Jan 2011 15:13:24 +0000 (+0000) Subject: (bug 26535) Variable naming collision in MessageBlobStore::updateMessage() caused... X-Git-Tag: 1.31.0-rc.0~32767 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=ee571487755af47db6fe85c72ee7411d4d26e518;p=lhc%2Fweb%2Fwiklou.git (bug 26535) Variable naming collision in MessageBlobStore::updateMessage() caused exception ('Non-string key given' in MessageCache) when conflicted updates were retried. --- 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 ) );