From 4819b2c1a2c75c0cb2f87ae19f2b20e4bdf3d234 Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Wed, 11 Sep 2013 10:28:38 -0400 Subject: [PATCH] Added sanity check for variable I like to remove the password field from records when I'm not using the password value, this caused an error when creating the cache keys. --- classes/Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Model.php b/classes/Model.php index 7dda6bd..d86783c 100644 --- a/classes/Model.php +++ b/classes/Model.php @@ -1447,7 +1447,7 @@ class Model extends Object foreach ($this->original[0] as $column => $value) { if (!String::isEmpty($value) && !in_array($column, $this->columns) - && $value != $this->record[$column]) + && isset($this->record[$column]) && $value != $this->record[$column]) { $cache_keys[] = $this->model . '-' . $column . '-' . $value; }