summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/libraries/ORM.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/system/libraries/ORM.php b/system/libraries/ORM.php
index 4dd2eaf0..eb34221c 100644
--- a/system/libraries/ORM.php
+++ b/system/libraries/ORM.php
@@ -1002,7 +1002,11 @@ class ORM_Core {
*/
public function reload()
{
- return $this->find($this->object[$this->primary_key]);
+ if ($this->_loaded) {
+ return $this->find($this->object[$this->primary_key]);
+ } else {
+ return $this->clear();
+ }
}
/**