summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Schneider2009-02-17 16:24:51 +0000
committerChristian Schneider2009-02-17 16:24:51 +0000
commitb3119196d1ceb8a3d6d57e4673e421229cfffec5 (patch)
tree19262b247391703f81d7fc31d08e93fb11515e7c
parentddc6c74bd050334537808c2418d2246055716562 (diff)
downloaditools-b3119196d1ceb8a3d6d57e4673e421229cfffec5.tar.gz
itools-b3119196d1ceb8a3d6d57e4673e421229cfffec5.tar.bz2
itools-b3119196d1ceb8a3d6d57e4673e421229cfffec5.zip
Do not read back after update if no key is set (uninitialized record)
-rw-r--r--it_dbi.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it_dbi.class b/it_dbi.class
index 66f75a6..ce11a49 100644
--- a/it_dbi.class
+++ b/it_dbi.class
@@ -645,7 +645,7 @@ function update($tags = array(), $query = null)
if (array_key_exists($this->_p['keyfield'], $tags)) # Did we just update the key?
$this->_key = $tags[$this->_p['keyfield']];
- if ($this->read($this->_key))
+ if (isset($this->_key) && $this->read($this->_key))
$this->_nofetch = false; # So we can do while(iterate()) update();
}
}