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:

<a href="javascript:void(0);"><strong>Notice</strong> (8)</a>: unserialize() [<a href="http://php.net/function.unserialize">function.unserialize</a>]: Error at offset 0 of 1391 bytes [<strong>CORE\cake\libs\cache\file.php</strong>, line <strong>176</strong>]

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

Txt cake/libs/file.php
<div>@@ -192,7 +192,7 @@ class File extends Object {</div>
195
<div>-    return $data;</div>
195
<div>+    return trim($data);</div>
Txt cake/tests/cases/libs/file.test.php
<div>@@ -115,7 +115,7 @@ class FileTest extends CakeTestCase {</div>
118
<div>-    $this-&gt;assertEqual($result, $expecting);</div>
118
<div>+    $this-&gt;assertEqual($result, trim($expecting));</div>

References:

1 comment so far

Add Your Comment
  1. When I was updating CakePHP to 1.3.1 on Window,I too found tha same error but actually the thing was that I was not able to find the solution for it.Looking at your post I get to understand what the solution is to which I will be appliying soon.