summaryrefslogtreecommitdiff
path: root/system/libraries/ORM.php
diff options
context:
space:
mode:
authorNathan Kinkade <nkinkade@nkinka.de>2010-12-06 16:14:26 +0000
committerNathan Kinkade <nkinkade@nkinka.de>2010-12-06 16:14:26 +0000
commitcf1965957c48b1c88a3913f8167688d03d191cec (patch)
tree9da9e719c68f4428771c9b70389b93f7a1bafd26 /system/libraries/ORM.php
parent1659e487a26ef0460926376b7b8b40aaba0c0577 (diff)
parentc3ef8921260db8e39b6d2a7b4708e3d19f35f8b5 (diff)
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'system/libraries/ORM.php')
-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();
+ }
}
/**