2010
06.03

Yesterday I did an upgrade from cake 1.30 to 1.31 on my Windows 2003 server. Unfortunately there was a problem with the cache files:

Notice (8): unserialize() [function.unserialize]: Error at offset 0 of 1391 bytes [CORE\cake\libs\cache\file.php, line 176]

Fortunately, finding an solution wasn’t to hard. A removed trim() seemed to be the culprit:

Txt cake/libs/file.php
@@ -192,7 +192,7 @@ class File extends Object {

195
-    return $data;

195
+    return trim($data);

Txt cake/tests/cases/libs/file.test.php
@@ -115,7 +115,7 @@ class FileTest extends CakeTestCase {

118
-    $this->assertEqual($result, $expecting);

118
+    $this->assertEqual($result, trim($expecting));

References:

No Comment.

Add Your Comment