From 6d54b24c5107a6ac04b66a6479f12390427500bd Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Thu, 4 Dec 2003 10:56:20 +0000 Subject: [PATCH] Bug fixes --- includes/Article.php | 2 +- includes/MemCachedClient.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 003ae203a4..305aaf7212 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1079,7 +1079,7 @@ class Article { if (!$messageCache) { $messageCache = wfLoadAllMessages(); } - $messageCache[$title] = $text; + $messageCache[$this->mTitle->getDBkey()] = $text; $wgMemc->set( "$wgDBname:messages", $messageCache, 86400 ); } } diff --git a/includes/MemCachedClient.inc.php b/includes/MemCachedClient.inc.php index 6bee4fdfa0..b21c0e70cc 100644 --- a/includes/MemCachedClient.inc.php +++ b/includes/MemCachedClient.inc.php @@ -1062,7 +1062,7 @@ class MemCachedClient // if we're almost at the end, read the rest, so // that we don't corrupt the \r\nEND\r\n - if ($bytes_read >= $len) + if ($bytes_read >= $len && $bytes_read < ($len +7)) { $lastbit = socket_read($sock, $len - $bytes_read + 7, PHP_BINARY_READ); $line .= $lastbit; -- 2.20.1