From: chrisj
Date: Thu May 17 02:54:51 2001
Modified files:
      php-lib-stable/php/ct_sql.inc

Log message:

Fix ac_store() to prevent duplicate containers (typically sessions) from
being stored.  I believe this fixes a bug introduced into 7.2c by changes
to support MySQL 3.23 default behavior for affected_rows(), but if I am
wrong, this bug is still obvious: db->f() isn't set until
db->next_record() is called.


Index: php-lib-stable/php/ct_sql.inc
diff -u php-lib-stable/php/ct_sql.inc:1.3 php-lib-stable/php/ct_sql.inc:1.4
--- php-lib-stable/php/ct_sql.inc:1.3   Wed Jul 12 20:22:34 2000
+++ php-lib-stable/php/ct_sql.inc       Thu May 17 02:54:20 2001
@@ -6,7 +6,7 @@
 ##
 ## Copyright (c) 1998-2000 Sascha Schumann <[EMAIL PROTECTED]>
 ## 
-## $Id: ct_sql.inc,v 1.3 2000/07/12 18:22:34 kk Exp $
+## $Id: ct_sql.inc,v 1.4 2001/05/17 00:54:20 chrisj Exp $
 ##
 ## PHPLIB Data Storage Container using a SQL database
 ##
@@ -110,7 +110,7 @@
  
     if ( $this->db->affected_rows() == 0
         && $this->db->query($squery)
-        && $this->db->f(1) == 0
+       && $this->db->next_record() && $this->db->f(0) == 0
         && !$this->db->query($iquery)) {
 
         $ret = false;



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to