From 19149986c1cdc53b549d46000ba1ecd5eba317f6 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 15 May 2009 17:08:29 +0000 Subject: Only cache rows if they are objects, which assumes also that they are instances of ORM. --- core/libraries/MY_ORM.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/libraries') diff --git a/core/libraries/MY_ORM.php b/core/libraries/MY_ORM.php index cc359799..fb2f80a7 100644 --- a/core/libraries/MY_ORM.php +++ b/core/libraries/MY_ORM.php @@ -38,7 +38,9 @@ class ORM_Iterator extends ORM_Iterator_Core { */ public function current() { $row = parent::current(); - model_cache::set($row); + if (is_object($row)) { + model_cache::set($row); + } return $row; } } \ No newline at end of file -- cgit v1.2.3