Again using same serialization strategy for cached view files, as in some environments file is corrupted

This commit is contained in:
Jose Lorenzo Rodriguez 2012-05-04 19:27:08 -04:30
parent 7fd19551db
commit 6f9b26fe58

View file

@ -291,7 +291,7 @@ class CacheHelper extends AppHelper {
}
$file .= '
$request = unserialize(\'' . str_replace("'", "\\'", serialize($this->request)) . '\');
$request = unserialize(base64_decode(\'' . base64_encode(serialize($this->request)) . '\'));
$response = new CakeResponse(array("charset" => Configure::read("App.encoding")));
$controller = new ' . $this->_View->name . 'Controller($request, $response);
$controller->plugin = $this->plugin = \'' . $this->_View->plugin . '\';