cvs: pear /MDB2/MDB2/Driver fbsql.php ibase.php mssql.php mysql.php oci8.php pgsql.php querysim.php sqlite.php
| From: | Lukas Smith | Date: | Fri, 30 Apr 2004 14:33:50 +0000 |
| Subject: | cvs: pear /MDB2/MDB2/Driver fbsql.php ibase.php mssql.php mysql.php oci8.php pgsql.php querysim.php sqlite.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-19024@lists.php.net to get a copy of this message | ||
lsmith Fri Apr 30 10:33:50 2004 EDT
Modified files:
/pear/MDB2/MDB2/Driver fbsql.php ibase.php mssql.php mysql.php
oci8.php pgsql.php querysim.php sqlite.php
Log:
- fixed issues in fetchRow due to MDB2_FETCHMODE_OBJECT
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/fbsql.php?r1=1.13&r2=1.14&ty=u Index: pear/MDB2/MDB2/Driver/fbsql.php diff -u pear/MDB2/MDB2/Driver/fbsql.php:1.13 pear/MDB2/MDB2/Driver/fbsql.php:1.14 --- pear/MDB2/MDB2/Driver/fbsql.php:1.13 Thu Apr 29 18:40:31 2004 +++ pear/MDB2/MDB2/Driver/fbsql.php Fri Apr 30 10:33:49 2004 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: fbsql.php,v 1.13 2004/04/29 22:40:31 lsmith Exp $ +// $Id: fbsql.php,v 1.14 2004/04/30 14:33:49 lsmith Exp $ // /** @@ -566,10 +566,6 @@ if ($fetchmode == MDB2_FETCHMODE_DEFAULT) { $fetchmode = $this->mdb->fetchmode; } - if ($fetchmode === MDB2_FETCHMODE_OBJECT) { - $fetchmode = MDB2_FETCHMODE_ASSOC; - $object_class = $this->mdb->options['fetch_class']; - } if ($fetchmode & MDB2_FETCHMODE_ASSOC) { $row = @fbsql_fetch_assoc($this->result); if ($this->mdb->options['portability'] & MDB2_PORTABILITY_LOWERCASE @@ -593,7 +589,8 @@ if ($this->mdb->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL) { $this->mdb->_convertEmptyArrayValuesToNull($row); } - if (isset($object_class)) { + if ($fetchmode === MDB2_FETCHMODE_OBJECT) { + $object_class = $this->mdb->options['fetch_class']; if ($object_class == 'stdClass') { $row = (object) $row; } else { http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/ibase.php?r1=1.25&r2=1.26&ty=u Index: pear/MDB2/MDB2/Driver/ibase.php diff -u pear/MDB2/MDB2/Driver/ibase.php:1.25 pear/MDB2/MDB2/Driver/ibase.php:1.26 --- pear/MDB2/MDB2/Driver/ibase.php:1.25 Thu Apr 29 18:40:31 2004 +++ pear/MDB2/MDB2/Driver/ibase.php Fri Apr 30 10:33:50 2004 @@ -43,7 +43,7 @@ // | Author: Lorenzo Alberton <l.alberton@quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.25 2004/04/29 22:40:31 lsmith Exp $ +// $Id: ibase.php,v 1.26 2004/04/30 14:33:50 lsmith Exp $ /** * MDB2 FireBird/InterBase driver @@ -715,10 +715,6 @@ if ($fetchmode == MDB2_FETCHMODE_DEFAULT) { $fetchmode = $this->mdb->fetchmode; } - if ($fetchmode === MDB2_FETCHMODE_OBJECT) { - $fetchmode = MDB2_FETCHMODE_ASSOC; - $object_class = $this->mdb->options['fetch_class']; - } if (!$this->_skipLimitOffset()) { return null; } @@ -748,7 +744,8 @@ if ($this->mdb->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL) { $this->mdb->_convertEmptyArrayValuesToNull($row); } - if (isset($object_class)) { + if ($fetchmode === MDB2_FETCHMODE_OBJECT) { + $object_class = $this->mdb->options['fetch_class']; if ($object_class == 'stdClass') { $row = (object) $row; } else { @@ -930,10 +927,6 @@ if ($fetchmode == MDB2_FETCHMODE_DEFAULT) { $fetchmode = $this->mdb->fetchmode; } - if ($fetchmode === MDB2_FETCHMODE_OBJECT) { - $fetchmode = MDB2_FETCHMODE_ASSOC; - $object_class = $this->mdb->options['fetch_class']; - } if (!$this->_fillBuffer($target_rownum)) { return null; } @@ -954,6 +947,14 @@ if ($this->mdb->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL) { $this->mdb->_convertEmptyArrayValuesToNull($row); } + if ($fetchmode === MDB2_FETCHMODE_OBJECT) { + $object_class = $this->mdb->options['fetch_class']; + if ($object_class == 'stdClass') { + $row = (object) $row; + } else { + $row = &new $object_class($row); + } + } ++$this->rownum; return $row; } http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/mssql.php?r1=1.14&r2=1.15&ty=u Index: pear/MDB2/MDB2/Driver/mssql.php diff -u pear/MDB2/MDB2/Driver/mssql.php:1.14 pear/MDB2/MDB2/Driver/mssql.php:1.15 --- pear/MDB2/MDB2/Driver/mssql.php:1.14 Thu Apr 29 18:40:31 2004 +++ pear/MDB2/MDB2/Driver/mssql.php Fri Apr 30 10:33:50 2004 @@ -43,7 +43,7 @@ // | Author: Frank M. Kromann <frank@kromann.info> | // +----------------------------------------------------------------------+ // -// $Id: mssql.php,v 1.14 2004/04/29 22:40:31 lsmith Exp $ +// $Id: mssql.php,v 1.15 2004/04/30 14:33:50 lsmith Exp $ // /** @@ -602,10 +602,6 @@ if ($fetchmode == MDB2_FETCHMODE_DEFAULT) { $fetchmode = $this->mdb->fetchmode; } - if ($fetchmode === MDB2_FETCHMODE_OBJECT) { - $fetchmode = MDB2_FETCHMODE_ASSOC; - $object_class = $this->mdb->options['fetch_class']; - } if (!$this->_skipLimitOffset()) { return null; } @@ -632,7 +628,8 @@ if ($this->mdb->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL) { $this->mdb->_convertEmptyArrayValuesToNull($row); } - if (isset($object_class)) { + if ($fetchmode === MDB2_FETCHMODE_OBJECT) { + $object_class = $this->mdb->options['fetch_class']; if ($object_class == 'stdClass') { $row = (object) $row; } else { http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/mysql.php?r1=1.15&r2=1.16&ty=u Index: pear/MDB2/MDB2/Driver/mysql.php diff -u pear/MDB2/MDB2/Driver/mysql.php:1.15 pear/MDB2/MDB2/Driver/mysql.php:1.16 --- pear/MDB2/MDB2/Driver/mysql.php:1.15 Thu Apr 29 18:40:31 2004 +++ pear/MDB2/MDB2/Driver/mysql.php Fri Apr 30 10:33:50 2004 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: mysql.php,v 1.15 2004/04/29 22:40:31 lsmith Exp $ +// $Id: mysql.php,v 1.16 2004/04/30 14:33:50 lsmith Exp $ // /** @@ -781,10 +781,6 @@ if ($fetchmode == MDB2_FETCHMODE_DEFAULT) { $fetchmode = $this->mdb->fetchmode; } - if ($fetchmode === MDB2_FETCHMODE_OBJECT) { - $fetchmode = MDB2_FETCHMODE_ASSOC; - $object_class = $this->mdb->options['fetch_class']; - } if ($fetchmode & MDB2_FETCHMODE_ASSOC) { $row = @mysql_fetch_assoc($this->result); if (is_array($row) @@ -808,7 +804,8 @@ if ($this->mdb->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL) { $this->mdb->_convertEmptyArrayValuesToNull($row); } - if (isset($object_class)) { + if ($fetchmode === MDB2_FETCHMODE_OBJECT) { + $object_class = $this->mdb->options['fetch_class']; if ($object_class == 'stdClass') { $row = (object) $row; } else { http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/oci8.php?r1=1.12&r2=1.13&ty=u Index: pear/MDB2/MDB2/Driver/oci8.php diff -u pear/MDB2/MDB2/Driver/oci8.php:1.12 pear/MDB2/MDB2/Driver/oci8.php:1.13 --- pear/MDB2/MDB2/Driver/oci8.php:1.12 Thu Apr 29 18:40:31 2004 +++ pear/MDB2/MDB2/Driver/oci8.php Fri Apr 30 10:33:50 2004 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ -// $Id: oci8.php,v 1.12 2004/04/29 22:40:31 lsmith Exp $ +// $Id: oci8.php,v 1.13 2004/04/30 14:33:50 lsmith Exp $ /** * MDB2 OCI8 driver @@ -777,10 +777,6 @@ if ($fetchmode == MDB2_FETCHMODE_DEFAULT) { $fetchmode = $this->mdb->fetchmode; } - if ($fetchmode === MDB2_FETCHMODE_OBJECT) { - $fetchmode = MDB2_FETCHMODE_ASSOC; - $object_class = $this->mdb->options['fetch_class']; - } if (!$this->_skipLimitOffset()) { return null; } @@ -807,7 +803,8 @@ if ($this->mdb->options['portability'] & MDB2_PORTABILITY_RTRIM) { $this->mdb->_rtrimArrayValues($row); } - if (isset($object_class)) { + if ($fetchmode === MDB2_FETCHMODE_OBJECT) { + $object_class = $this->mdb->options['fetch_class']; if ($object_class == 'stdClass') { $row = (object) $row; } else { @@ -978,10 +975,6 @@ if ($fetchmode == MDB2_FETCHMODE_DEFAULT) { $fetchmode = $this->mdb->fetchmode; } - if ($fetchmode === MDB2_FETCHMODE_OBJECT) { - $fetchmode = MDB2_FETCHMODE_ASSOC; - $object_class = $this->mdb->options['fetch_class']; - } if (!$this->_fillBuffer($target_rownum)) { return null; } @@ -999,6 +992,14 @@ if ($this->mdb->options['portability'] & MDB2_PORTABILITY_RTRIM) { $this->mdb->_rtrimArrayValues($row); } + if ($fetchmode === MDB2_FETCHMODE_OBJECT) { + $object_class = $this->mdb->options['fetch_class']; + if ($object_class == 'stdClass') { + $row = (object) $row; + } else { + $row = &new $object_class($row); + } + } ++$this->rownum; return $row; } http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/pgsql.php?r1=1.14&r2=1.15&ty=u Index: pear/MDB2/MDB2/Driver/pgsql.php diff -u pear/MDB2/MDB2/Driver/pgsql.php:1.14 pear/MDB2/MDB2/Driver/pgsql.php:1.15 --- pear/MDB2/MDB2/Driver/pgsql.php:1.14 Thu Apr 29 18:40:31 2004 +++ pear/MDB2/MDB2/Driver/pgsql.php Fri Apr 30 10:33:50 2004 @@ -43,7 +43,7 @@ // | Author: Paul Cooper <pgc@ucecom.com> | // +----------------------------------------------------------------------+ // -// $Id: pgsql.php,v 1.14 2004/04/29 22:40:31 lsmith Exp $ +// $Id: pgsql.php,v 1.15 2004/04/30 14:33:50 lsmith Exp $ /** * MDB2 PostGreSQL driver @@ -625,10 +625,6 @@ if ($fetchmode == MDB2_FETCHMODE_DEFAULT) { $fetchmode = $this->mdb->fetchmode; } - if ($fetchmode === MDB2_FETCHMODE_OBJECT) { - $fetchmode = MDB2_FETCHMODE_ASSOC; - $object_class = $this->mdb->options['fetch_class']; - } if ($fetchmode & MDB2_FETCHMODE_ASSOC) { $row = @pg_fetch_array($this->result, null, PGSQL_ASSOC); if (is_array($row) @@ -652,7 +648,8 @@ if ($this->mdb->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL) { $this->mdb->_convertEmptyArrayValuesToNull($row); } - if (isset($object_class)) { + if ($fetchmode === MDB2_FETCHMODE_OBJECT) { + $object_class = $this->mdb->options['fetch_class']; if ($object_class == 'stdClass') { $row = (object) $row; } else { http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/querysim.php?r1=1.10&r2=1.11&ty=u Index: pear/MDB2/MDB2/Driver/querysim.php diff -u pear/MDB2/MDB2/Driver/querysim.php:1.10 pear/MDB2/MDB2/Driver/querysim.php:1.11 --- pear/MDB2/MDB2/Driver/querysim.php:1.10 Thu Apr 29 18:40:31 2004 +++ pear/MDB2/MDB2/Driver/querysim.php Fri Apr 30 10:33:50 2004 @@ -61,7 +61,7 @@ // | please contact Alan Richmond. | // +----------------------------------------------------------------------+ // -// $Id: querysim.php,v 1.10 2004/04/29 22:40:31 lsmith Exp $ +// $Id: querysim.php,v 1.11 2004/04/30 14:33:50 lsmith Exp $ // /* @@ -597,10 +597,6 @@ if ($fetchmode == MDB2_FETCHMODE_DEFAULT) { $fetchmode = $this->mdb->fetchmode; } - if ($fetchmode === MDB2_FETCHMODE_OBJECT) { - $fetchmode = MDB2_FETCHMODE_ASSOC; - $object_class = $this->mdb->options['fetch_class']; - } if (!isset($this->result[1][$target_rownum])) { return null; } @@ -622,7 +618,8 @@ if ($this->mdb->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL) { $this->mdb->_convertEmptyArrayValuesToNull($row); } - if (isset($object_class)) { + if ($fetchmode === MDB2_FETCHMODE_OBJECT) { + $object_class = $this->mdb->options['fetch_class']; if ($object_class == 'stdClass') { $row = (object) $row; } else { http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/sqlite.php?r1=1.17&r2=1.18&ty=u Index: pear/MDB2/MDB2/Driver/sqlite.php diff -u pear/MDB2/MDB2/Driver/sqlite.php:1.17 pear/MDB2/MDB2/Driver/sqlite.php:1.18 --- pear/MDB2/MDB2/Driver/sqlite.php:1.17 Thu Apr 29 18:40:31 2004 +++ pear/MDB2/MDB2/Driver/sqlite.php Fri Apr 30 10:33:50 2004 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: sqlite.php,v 1.17 2004/04/29 22:40:31 lsmith Exp $ +// $Id: sqlite.php,v 1.18 2004/04/30 14:33:50 lsmith Exp $ // /** @@ -717,10 +717,6 @@ if ($fetchmode == MDB2_FETCHMODE_DEFAULT) { $fetchmode = $this->mdb->fetchmode; } - if ($fetchmode === MDB2_FETCHMODE_OBJECT) { - $fetchmode = MDB2_FETCHMODE_ASSOC; - $object_class = $this->mdb->options['fetch_class']; - } if ($fetchmode & MDB2_FETCHMODE_ASSOC) { $row = @sqlite_fetch_array($this->result, SQLITE_ASSOC); if (is_array($row) @@ -744,7 +740,8 @@ if ($this->mdb->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL) { $this->mdb->_convertEmptyArrayValuesToNull($row); } - if (isset($object_class)) { + if ($fetchmode === MDB2_FETCHMODE_OBJECT) { + $object_class = $this->mdb->options['fetch_class']; if ($object_class == 'stdClass') { $row = (object) $row; } else {
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/fbsql.php?r1=1.13&r2=1.14&ty=u Index: pear/MDB2/MDB2/Driver/fbsql.php diff -u pear/MDB2/MDB2/Driver/fbsql.php:1.13 pear/MDB2/MDB2/Driver/fbsql.php:1.14 --- pear/MDB2/MDB2/Driver/fbsql.php:1.13 Thu Apr 29 18:40:31 2004 +++ pear/MDB2/MDB2/Driver/fbsql.php Fri Apr 30 10:33:49 2004 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: fbsql.php,v 1.13 2004/04/29 22:40:31 lsmith Exp $ +// $Id: fbsql.php,v 1.14 2004/04/30 14:33:49 lsmith Exp $ // /** @@ -566,10 +566,6 @@ if ($fetchmode == MDB2_FETCHMODE_DEFAULT) { $fetchmode = $this->mdb->fetchmode; } - if ($fetchmode === MDB2_FETCHMODE_OBJECT) { - $fetchmode = MDB2_FETCHMODE_ASSOC; - $object_class = $this->mdb->options['fetch_class']; - } if ($fetchmode & MDB2_FETCHMODE_ASSOC) { $row = @fbsql_fetch_assoc($this->result); if ($this->mdb->options['portability'] & MDB2_PORTABILITY_LOWERCASE @@ -593,7 +589,8 @@ if ($this->mdb->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL) { $this->mdb->_convertEmptyArrayValuesToNull($row); } - if (isset($object_class)) { + if ($fetchmode === MDB2_FETCHMODE_OBJECT) { + $object_class = $this->mdb->options['fetch_class']; if ($object_class == 'stdClass') { $row = (object) $row; } else { http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/ibase.php?r1=1.25&r2=1.26&ty=u Index: pear/MDB2/MDB2/Driver/ibase.php diff -u pear/MDB2/MDB2/Driver/ibase.php:1.25 pear/MDB2/MDB2/Driver/ibase.php:1.26 --- pear/MDB2/MDB2/Driver/ibase.php:1.25 Thu Apr 29 18:40:31 2004 +++ pear/MDB2/MDB2/Driver/ibase.php Fri Apr 30 10:33:50 2004 @@ -43,7 +43,7 @@ // | Author: Lorenzo Alberton <l.alberton@quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.25 2004/04/29 22:40:31 lsmith Exp $ +// $Id: ibase.php,v 1.26 2004/04/30 14:33:50 lsmith Exp $ /** * MDB2 FireBird/InterBase driver @@ -715,10 +715,6 @@ if ($fetchmode == MDB2_FETCHMODE_DEFAULT) { $fetchmode = $this->mdb->fetchmode; } - if ($fetchmode === MDB2_FETCHMODE_OBJECT) { - $fetchmode = MDB2_FETCHMODE_ASSOC; - $object_class = $this->mdb->options['fetch_class']; - } if (!$this->_skipLimitOffset()) { return null; } @@ -748,7 +744,8 @@ if ($this->mdb->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL) { $this->mdb->_convertEmptyArrayValuesToNull($row); } - if (isset($object_class)) { + if ($fetchmode === MDB2_FETCHMODE_OBJECT) { + $object_class = $this->mdb->options['fetch_class']; if ($object_class == 'stdClass') { $row = (object) $row; } else { @@ -930,10 +927,6 @@ if ($fetchmode == MDB2_FETCHMODE_DEFAULT) { $fetchmode = $this->mdb->fetchmode; } - if ($fetchmode === MDB2_FETCHMODE_OBJECT) { - $fetchmode = MDB2_FETCHMODE_ASSOC; - $object_class = $this->mdb->options['fetch_class']; - } if (!$this->_fillBuffer($target_rownum)) { return null; } @@ -954,6 +947,14 @@ if ($this->mdb->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL) { $this->mdb->_convertEmptyArrayValuesToNull($row); } + if ($fetchmode === MDB2_FETCHMODE_OBJECT) { + $object_class = $this->mdb->options['fetch_class']; + if ($object_class == 'stdClass') { + $row = (object) $row; + } else { + $row = &new $object_class($row); + } + } ++$this->rownum; return $row; } http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/mssql.php?r1=1.14&r2=1.15&ty=u Index: pear/MDB2/MDB2/Driver/mssql.php diff -u pear/MDB2/MDB2/Driver/mssql.php:1.14 pear/MDB2/MDB2/Driver/mssql.php:1.15 --- pear/MDB2/MDB2/Driver/mssql.php:1.14 Thu Apr 29 18:40:31 2004 +++ pear/MDB2/MDB2/Driver/mssql.php Fri Apr 30 10:33:50 2004 @@ -43,7 +43,7 @@ // | Author: Frank M. Kromann <frank@kromann.info> | // +----------------------------------------------------------------------+ // -// $Id: mssql.php,v 1.14 2004/04/29 22:40:31 lsmith Exp $ +// $Id: mssql.php,v 1.15 2004/04/30 14:33:50 lsmith Exp $ // /** @@ -602,10 +602,6 @@ if ($fetchmode == MDB2_FETCHMODE_DEFAULT) { $fetchmode = $this->mdb->fetchmode; } - if ($fetchmode === MDB2_FETCHMODE_OBJECT) { - $fetchmode = MDB2_FETCHMODE_ASSOC; - $object_class = $this->mdb->options['fetch_class']; - } if (!$this->_skipLimitOffset()) { return null; } @@ -632,7 +628,8 @@ if ($this->mdb->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL) { $this->mdb->_convertEmptyArrayValuesToNull($row); } - if (isset($object_class)) { + if ($fetchmode === MDB2_FETCHMODE_OBJECT) { + $object_class = $this->mdb->options['fetch_class']; if ($object_class == 'stdClass') { $row = (object) $row; } else { http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/mysql.php?r1=1.15&r2=1.16&ty=u Index: pear/MDB2/MDB2/Driver/mysql.php diff -u pear/MDB2/MDB2/Driver/mysql.php:1.15 pear/MDB2/MDB2/Driver/mysql.php:1.16 --- pear/MDB2/MDB2/Driver/mysql.php:1.15 Thu Apr 29 18:40:31 2004 +++ pear/MDB2/MDB2/Driver/mysql.php Fri Apr 30 10:33:50 2004 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: mysql.php,v 1.15 2004/04/29 22:40:31 lsmith Exp $ +// $Id: mysql.php,v 1.16 2004/04/30 14:33:50 lsmith Exp $ // /** @@ -781,10 +781,6 @@ if ($fetchmode == MDB2_FETCHMODE_DEFAULT) { $fetchmode = $this->mdb->fetchmode; } - if ($fetchmode === MDB2_FETCHMODE_OBJECT) { - $fetchmode = MDB2_FETCHMODE_ASSOC; - $object_class = $this->mdb->options['fetch_class']; - } if ($fetchmode & MDB2_FETCHMODE_ASSOC) { $row = @mysql_fetch_assoc($this->result); if (is_array($row) @@ -808,7 +804,8 @@ if ($this->mdb->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL) { $this->mdb->_convertEmptyArrayValuesToNull($row); } - if (isset($object_class)) { + if ($fetchmode === MDB2_FETCHMODE_OBJECT) { + $object_class = $this->mdb->options['fetch_class']; if ($object_class == 'stdClass') { $row = (object) $row; } else { http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/oci8.php?r1=1.12&r2=1.13&ty=u Index: pear/MDB2/MDB2/Driver/oci8.php diff -u pear/MDB2/MDB2/Driver/oci8.php:1.12 pear/MDB2/MDB2/Driver/oci8.php:1.13 --- pear/MDB2/MDB2/Driver/oci8.php:1.12 Thu Apr 29 18:40:31 2004 +++ pear/MDB2/MDB2/Driver/oci8.php Fri Apr 30 10:33:50 2004 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ -// $Id: oci8.php,v 1.12 2004/04/29 22:40:31 lsmith Exp $ +// $Id: oci8.php,v 1.13 2004/04/30 14:33:50 lsmith Exp $ /** * MDB2 OCI8 driver @@ -777,10 +777,6 @@ if ($fetchmode == MDB2_FETCHMODE_DEFAULT) { $fetchmode = $this->mdb->fetchmode; } - if ($fetchmode === MDB2_FETCHMODE_OBJECT) { - $fetchmode = MDB2_FETCHMODE_ASSOC; - $object_class = $this->mdb->options['fetch_class']; - } if (!$this->_skipLimitOffset()) { return null; } @@ -807,7 +803,8 @@ if ($this->mdb->options['portability'] & MDB2_PORTABILITY_RTRIM) { $this->mdb->_rtrimArrayValues($row); } - if (isset($object_class)) { + if ($fetchmode === MDB2_FETCHMODE_OBJECT) { + $object_class = $this->mdb->options['fetch_class']; if ($object_class == 'stdClass') { $row = (object) $row; } else { @@ -978,10 +975,6 @@ if ($fetchmode == MDB2_FETCHMODE_DEFAULT) { $fetchmode = $this->mdb->fetchmode; } - if ($fetchmode === MDB2_FETCHMODE_OBJECT) { - $fetchmode = MDB2_FETCHMODE_ASSOC; - $object_class = $this->mdb->options['fetch_class']; - } if (!$this->_fillBuffer($target_rownum)) { return null; } @@ -999,6 +992,14 @@ if ($this->mdb->options['portability'] & MDB2_PORTABILITY_RTRIM) { $this->mdb->_rtrimArrayValues($row); } + if ($fetchmode === MDB2_FETCHMODE_OBJECT) { + $object_class = $this->mdb->options['fetch_class']; + if ($object_class == 'stdClass') { + $row = (object) $row; + } else { + $row = &new $object_class($row); + } + } ++$this->rownum; return $row; } http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/pgsql.php?r1=1.14&r2=1.15&ty=u Index: pear/MDB2/MDB2/Driver/pgsql.php diff -u pear/MDB2/MDB2/Driver/pgsql.php:1.14 pear/MDB2/MDB2/Driver/pgsql.php:1.15 --- pear/MDB2/MDB2/Driver/pgsql.php:1.14 Thu Apr 29 18:40:31 2004 +++ pear/MDB2/MDB2/Driver/pgsql.php Fri Apr 30 10:33:50 2004 @@ -43,7 +43,7 @@ // | Author: Paul Cooper <pgc@ucecom.com> | // +----------------------------------------------------------------------+ // -// $Id: pgsql.php,v 1.14 2004/04/29 22:40:31 lsmith Exp $ +// $Id: pgsql.php,v 1.15 2004/04/30 14:33:50 lsmith Exp $ /** * MDB2 PostGreSQL driver @@ -625,10 +625,6 @@ if ($fetchmode == MDB2_FETCHMODE_DEFAULT) { $fetchmode = $this->mdb->fetchmode; } - if ($fetchmode === MDB2_FETCHMODE_OBJECT) { - $fetchmode = MDB2_FETCHMODE_ASSOC; - $object_class = $this->mdb->options['fetch_class']; - } if ($fetchmode & MDB2_FETCHMODE_ASSOC) { $row = @pg_fetch_array($this->result, null, PGSQL_ASSOC); if (is_array($row) @@ -652,7 +648,8 @@ if ($this->mdb->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL) { $this->mdb->_convertEmptyArrayValuesToNull($row); } - if (isset($object_class)) { + if ($fetchmode === MDB2_FETCHMODE_OBJECT) { + $object_class = $this->mdb->options['fetch_class']; if ($object_class == 'stdClass') { $row = (object) $row; } else { http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/querysim.php?r1=1.10&r2=1.11&ty=u Index: pear/MDB2/MDB2/Driver/querysim.php diff -u pear/MDB2/MDB2/Driver/querysim.php:1.10 pear/MDB2/MDB2/Driver/querysim.php:1.11 --- pear/MDB2/MDB2/Driver/querysim.php:1.10 Thu Apr 29 18:40:31 2004 +++ pear/MDB2/MDB2/Driver/querysim.php Fri Apr 30 10:33:50 2004 @@ -61,7 +61,7 @@ // | please contact Alan Richmond. | // +----------------------------------------------------------------------+ // -// $Id: querysim.php,v 1.10 2004/04/29 22:40:31 lsmith Exp $ +// $Id: querysim.php,v 1.11 2004/04/30 14:33:50 lsmith Exp $ // /* @@ -597,10 +597,6 @@ if ($fetchmode == MDB2_FETCHMODE_DEFAULT) { $fetchmode = $this->mdb->fetchmode; } - if ($fetchmode === MDB2_FETCHMODE_OBJECT) { - $fetchmode = MDB2_FETCHMODE_ASSOC; - $object_class = $this->mdb->options['fetch_class']; - } if (!isset($this->result[1][$target_rownum])) { return null; } @@ -622,7 +618,8 @@ if ($this->mdb->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL) { $this->mdb->_convertEmptyArrayValuesToNull($row); } - if (isset($object_class)) { + if ($fetchmode === MDB2_FETCHMODE_OBJECT) { + $object_class = $this->mdb->options['fetch_class']; if ($object_class == 'stdClass') { $row = (object) $row; } else { http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/sqlite.php?r1=1.17&r2=1.18&ty=u Index: pear/MDB2/MDB2/Driver/sqlite.php diff -u pear/MDB2/MDB2/Driver/sqlite.php:1.17 pear/MDB2/MDB2/Driver/sqlite.php:1.18 --- pear/MDB2/MDB2/Driver/sqlite.php:1.17 Thu Apr 29 18:40:31 2004 +++ pear/MDB2/MDB2/Driver/sqlite.php Fri Apr 30 10:33:50 2004 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: sqlite.php,v 1.17 2004/04/29 22:40:31 lsmith Exp $ +// $Id: sqlite.php,v 1.18 2004/04/30 14:33:50 lsmith Exp $ // /** @@ -717,10 +717,6 @@ if ($fetchmode == MDB2_FETCHMODE_DEFAULT) { $fetchmode = $this->mdb->fetchmode; } - if ($fetchmode === MDB2_FETCHMODE_OBJECT) { - $fetchmode = MDB2_FETCHMODE_ASSOC; - $object_class = $this->mdb->options['fetch_class']; - } if ($fetchmode & MDB2_FETCHMODE_ASSOC) { $row = @sqlite_fetch_array($this->result, SQLITE_ASSOC); if (is_array($row) @@ -744,7 +740,8 @@ if ($this->mdb->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL) { $this->mdb->_convertEmptyArrayValuesToNull($row); } - if (isset($object_class)) { + if ($fetchmode === MDB2_FETCHMODE_OBJECT) { + $object_class = $this->mdb->options['fetch_class']; if ($object_class == 'stdClass') { $row = (object) $row; } else {