Browse Source

Merge pull request #435 from cviebrock/develop

Fix for Issue #433
Taylor Otwell 12 years ago
parent
commit
2809eb260f
3 changed files with 5 additions and 5 deletions
  1. 2 2
      laravel/cache/drivers/apc.php
  2. 2 2
      laravel/cache/drivers/memcached.php
  3. 1 1
      laravel/form.php

+ 2 - 2
laravel/cache/drivers/apc.php

@@ -41,7 +41,7 @@ class APC extends Driver {
 	{
 		if (($cache = apc_fetch($this->key.$key)) !== false)
 		{
-			return $cache;
+			return unserialize($cache);
 		}
 	}
 
@@ -60,7 +60,7 @@ class APC extends Driver {
 	 */
 	public function put($key, $value, $minutes)
 	{
-		apc_store($this->key.$key, $value, $minutes * 60);
+		apc_store($this->key.$key, serialize($value), $minutes * 60);
 	}
 
 	/**

+ 2 - 2
laravel/cache/drivers/memcached.php

@@ -49,7 +49,7 @@ class Memcached extends Driver {
 	{
 		if (($cache = $this->memcache->get($this->key.$key)) !== false)
 		{
-			return $cache;
+			return unserialize($cache);
 		}
 	}
 
@@ -68,7 +68,7 @@ class Memcached extends Driver {
 	 */
 	public function put($key, $value, $minutes)
 	{
-		$this->memcache->set($this->key.$key, $value, 0, $minutes * 60);
+		$this->memcache->set($this->key.$key, serialize($value), 0, $minutes * 60);
 	}
 
 	/**

+ 1 - 1
laravel/form.php

@@ -588,4 +588,4 @@ class Form {
 	    throw new \Exception("Method [$method] does not exist.");
 	}
 
-}
+}