Commit d7a69b60 by Qiang Xue

typo fix.

parent b51aa4ed
...@@ -163,9 +163,9 @@ abstract class Cache extends ApplicationComponent implements \ArrayAccess ...@@ -163,9 +163,9 @@ abstract class Cache extends ApplicationComponent implements \ArrayAccess
$dependency->evaluateDependency(); $dependency->evaluateDependency();
} }
if ($this->serializer === null) { if ($this->serializer === null) {
$value = array(serialize($value), $dependency); $value = serialize(array($value, $dependency));
} elseif ($this->serializer !== false) { } elseif ($this->serializer !== false) {
$value = array(call_user_func($this->serializer[0], $value), $dependency); $value = call_user_func($this->serializer[0], array($value, $dependency));
} }
return $this->setValue($this->generateCacheKey($id), $value, $expire); return $this->setValue($this->generateCacheKey($id), $value, $expire);
} }
...@@ -186,9 +186,9 @@ abstract class Cache extends ApplicationComponent implements \ArrayAccess ...@@ -186,9 +186,9 @@ abstract class Cache extends ApplicationComponent implements \ArrayAccess
$dependency->evaluateDependency(); $dependency->evaluateDependency();
} }
if ($this->serializer === null) { if ($this->serializer === null) {
$value = array(serialize($value), $dependency); $value = serialize(array($value, $dependency));
} elseif ($this->serializer !== false) { } elseif ($this->serializer !== false) {
$value = array(call_user_func($this->serializer[0], $value), $dependency); $value = call_user_func($this->serializer[0], array($value, $dependency));
} }
return $this->addValue($this->generateCacheKey($id), $value, $expire); return $this->addValue($this->generateCacheKey($id), $value, $expire);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment