Adding fix from #1316

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3491 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2006-09-15 00:10:09 +00:00
parent fc54b0f31a
commit 4e3e5df7d6

View file

@ -203,7 +203,8 @@ class Object{
function _savePersistent($name, &$object) {
$file = 'persistent' . DS . strtolower($name) . '.php';
$objectArray = array(&$object);
$data = '<?php $' . $name . ' = \'' . str_replace('\'', '\\\'', serialize($objectArray)) . '\' ?>';
$data = str_replace('\\', '\\\\', serialize($objectArray));
$data = '<?php $' . $name . ' = \'' . str_replace('\'', '\\\'', $data) . '\' ?>';
cache($file, $data, '+1 day');
}
/**