From b3119196d1ceb8a3d6d57e4673e421229cfffec5 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Tue, 17 Feb 2009 16:24:51 +0000 Subject: Do not read back after update if no key is set (uninitialized record) --- it_dbi.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); } } -- cgit v1.2.3