mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Using same serialization strategy for request object in cached views, this prevents some failing tests in environments
with different charsets
This commit is contained in:
parent
6b045318d8
commit
4f6f041730
2 changed files with 2 additions and 2 deletions
|
@ -1423,7 +1423,7 @@ class DispatcherTest extends CakeTestCase {
|
|||
|
||||
$cached = preg_replace('/<!--+[^<>]+-->/', '', $cached);
|
||||
|
||||
$this->assertTextEquals($cached, $out);
|
||||
$this->assertTextEquals($out, $cached);
|
||||
|
||||
$filename = $this->__cachePath($request->here());
|
||||
unlink($filename);
|
||||
|
|
|
@ -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 . '\';
|
||||
|
|
Loading…
Add table
Reference in a new issue