From df66228142a2643b7b5e758e27ffcc1765873b2d Mon Sep 17 00:00:00 2001 From: phpnut Date: Fri, 14 Dec 2007 07:18:59 +0000 Subject: [PATCH] "Fixes #3682" git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6150 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/cache/file.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cake/libs/cache/file.php b/cake/libs/cache/file.php index 0adc7cf5a..f7cc42abc 100644 --- a/cake/libs/cache/file.php +++ b/cake/libs/cache/file.php @@ -126,8 +126,13 @@ class FileEngine extends CacheEngine { if ($duration == null) { $duration = $this->settings['duration']; } + if (!empty($this->settings['serialize'])) { - $data = serialize($data); + if (substr(PHP_OS, 0, 3) == "WIN") { + $data = str_replace('\\', '\\\\\\\\', serialize($data)); + } else { + $data = serialize($data); + } } if ($this->settings['lock']) {