--- library/Zend/Cache/Core.php (révision 23617) +++ library/Zend/Cache/Core.php (copie de travail) @@ -345,12 +345,13 @@ if (!$this->_options['caching']) { return true; } - if ($id === null) { - $id = $this->_lastId; + $cached_id = $id; + if ($cached_id === null) { + $cached_id = $this->_lastId; } else { - $id = $this->_id($id); + $cached_id = $this->_id($cached_id); } - self::_validateIdOrTag($id); + self::_validateIdOrTag($cached_id); self::_validateTagsArray($tags); if ($this->_options['automatic_serialization']) { // we need to serialize datas before storing them @@ -385,9 +386,9 @@ $abort = ignore_user_abort(true); } if (($this->_extendedBackend) && ($this->_backendCapabilities['priority'])) { - $result = $this->_backend->save($data, $id, $tags, $specificLifetime, $priority); + $result = $this->_backend->save($data, $cached_id, $tags, $specificLifetime, $priority); } else { - $result = $this->_backend->save($data, $id, $tags, $specificLifetime); + $result = $this->_backend->save($data, $cached_id, $tags, $specificLifetime); } if ($this->_options['ignore_user_abort']) { ignore_user_abort($abort); @@ -401,10 +402,10 @@ return false; } if ($this->_options['write_control']) { - $data2 = $this->_backend->load($id, true); + $data2 = $this->_backend->load($cached_id, true); if ($data!=$data2) { $this->_log('Zend_Cache_Core::save() / write_control : written and read data do not match'); - $this->_backend->remove($id); + $this->_backend->remove($cached_id); return false; } }