diff options
author | Christian Schneider | 2009-02-17 16:24:51 +0000 |
---|---|---|
committer | Christian Schneider | 2009-02-17 16:24:51 +0000 |
commit | b3119196d1ceb8a3d6d57e4673e421229cfffec5 (patch) | |
tree | 19262b247391703f81d7fc31d08e93fb11515e7c | |
parent | ddc6c74bd050334537808c2418d2246055716562 (diff) | |
download | itools-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.class | 2 |
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(); } } |