From 7c7734d8e25916998d4cac34d1615f5ae68aa1df Mon Sep 17 00:00:00 2001 From: Colin Viebrock Date: Sun, 18 Mar 2012 20:30:21 -0500 Subject: [PATCH 1/3] Typo? --- laravel/database/eloquent/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laravel/database/eloquent/model.php b/laravel/database/eloquent/model.php index f1b7d74b..e09db992 100644 --- a/laravel/database/eloquent/model.php +++ b/laravel/database/eloquent/model.php @@ -405,7 +405,7 @@ final public function sync() */ public function changed($attribute) { - array_get($this->attributes, $attribute) !== array_get($this->original, $attribute); + return array_get($this->attributes, $attribute) !== array_get($this->original, $attribute); } /** From 8f103cdeaebc4425ff6a00fb4f5dc34633e0a4a9 Mon Sep 17 00:00:00 2001 From: Colin Viebrock Date: Tue, 20 Mar 2012 22:30:20 -0500 Subject: [PATCH 2/3] Remove PHP_EOL, fixes #430. Signed-off-by: Colin Viebrock --- laravel/form.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/laravel/form.php b/laravel/form.php index 1fd97ca6..155bb6d5 100644 --- a/laravel/form.php +++ b/laravel/form.php @@ -59,7 +59,7 @@ public static function open($action = null, $method = 'POST', $attributes = arra $append = static::hidden(Request::spoofer, $method); } - return ''.$append.PHP_EOL; + return ''.$append; } /** @@ -172,7 +172,7 @@ public static function label($name, $value, $attributes = array()) $value = HTML::entities($value); - return ''.PHP_EOL; + return ''; } /** @@ -200,7 +200,7 @@ public static function input($type, $name, $value = null, $attributes = array()) $attributes = array_merge($attributes, compact('type', 'name', 'value', 'id')); - return ''.PHP_EOL; + return ''; } /** @@ -349,7 +349,7 @@ public static function textarea($name, $value = '', $attributes = array()) if ( ! isset($attributes['cols'])) $attributes['cols'] = 50; - return ''.HTML::entities($value).''.PHP_EOL; + return ''.HTML::entities($value).''; } /** @@ -382,7 +382,7 @@ public static function select($name, $options = array(), $selected = null, $attr $html[] = static::option($value, $display, $selected); } - return ''.implode('', $html).''.PHP_EOL; + return ''.implode('', $html).''; } /** @@ -527,7 +527,7 @@ public static function image($url, $name = null, $attributes = array()) */ public static function button($value, $attributes = array()) { - return ''.HTML::entities($value).''.PHP_EOL; + return ''.HTML::entities($value).''; } /** @@ -554,4 +554,4 @@ protected static function id($name, $attributes) } } -} \ No newline at end of file +} From 1d5ad48998ff9ef9dfc1e2410182aa9101e1ba6d Mon Sep 17 00:00:00 2001 From: Colin Viebrock Date: Wed, 21 Mar 2012 14:18:25 -0500 Subject: [PATCH 3/3] Fix APC and Memcached drivers -- fixes #433 Signed-off-by: Colin Viebrock --- laravel/cache/drivers/apc.php | 4 ++-- laravel/cache/drivers/memcached.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/laravel/cache/drivers/apc.php b/laravel/cache/drivers/apc.php index 2fade423..eb067e44 100644 --- a/laravel/cache/drivers/apc.php +++ b/laravel/cache/drivers/apc.php @@ -41,7 +41,7 @@ protected function retrieve($key) { if (($cache = apc_fetch($this->key.$key)) !== false) { - return $cache; + return unserialize($cache); } } @@ -60,7 +60,7 @@ protected function retrieve($key) */ public function put($key, $value, $minutes) { - apc_store($this->key.$key, $value, $minutes * 60); + apc_store($this->key.$key, serialize($value), $minutes * 60); } /** diff --git a/laravel/cache/drivers/memcached.php b/laravel/cache/drivers/memcached.php index 4601e385..96380a8e 100644 --- a/laravel/cache/drivers/memcached.php +++ b/laravel/cache/drivers/memcached.php @@ -49,7 +49,7 @@ protected function retrieve($key) { if (($cache = $this->memcache->get($this->key.$key)) !== false) { - return $cache; + return unserialize($cache); } } @@ -68,7 +68,7 @@ protected function retrieve($key) */ 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); } /**