cvs: pear /MDB/MDB fbsql.php mssql.php mysql.php pgsql.php

From: Date: Tue, 30 Sep 2003 19:04:32 +0000
Subject: cvs: pear /MDB/MDB fbsql.php mssql.php mysql.php pgsql.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-13193@lists.php.net to get a copy of this message
lsmith Tue Sep 30 15:04:32 2003 EDT Modified files: /pear/MDB/MDB pgsql.php mysql.php mssql.php fbsql.php Log: cosmetic fix to numrows Index: pear/MDB/MDB/pgsql.php diff -u pear/MDB/MDB/pgsql.php:1.97 pear/MDB/MDB/pgsql.php:1.98 --- pear/MDB/MDB/pgsql.php:1.97 Tue Sep 23 09:43:26 2003 +++ pear/MDB/MDB/pgsql.php Tue Sep 30 15:04:31 2003 @@ -42,7 +42,7 @@ // | Author: Paul Cooper <pgc@ucecom.com> | // +----------------------------------------------------------------------+ // -// $Id: pgsql.php,v 1.97 2003/09/23 13:43:26 lsmith Exp $ +// $Id: pgsql.php,v 1.98 2003/09/30 19:04:31 lsmith Exp $ require_once 'MDB/Common.php'; @@ -648,6 +648,10 @@ function numRows($result) { if ($this->options['result_buffering']) { + if (!isset($this->results[intval($result)])) { + return $this->raiseError(MDB_ERROR, null, null, + 'numRows: attempted to check the end of an unknown result'); + } return pg_num_rows($result); } return $this->raiseError(MDB_ERROR, null, null, Index: pear/MDB/MDB/mysql.php diff -u pear/MDB/MDB/mysql.php:1.115 pear/MDB/MDB/mysql.php:1.116 --- pear/MDB/MDB/mysql.php:1.115 Tue Sep 23 09:43:25 2003 +++ pear/MDB/MDB/mysql.php Tue Sep 30 15:04:31 2003 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: mysql.php,v 1.115 2003/09/23 13:43:25 lsmith Exp $ +// $Id: mysql.php,v 1.116 2003/09/30 19:04:31 lsmith Exp $ // require_once 'MDB/Common.php'; @@ -692,6 +692,10 @@ function numRows($result) { if ($this->options['result_buffering']) { + if (!isset($this->results[intval($result)])) { + return $this->raiseError(MDB_ERROR, null, null, + 'numRows: attempted to check the end of an unknown result'); + } return mysql_num_rows($result); } return $this->raiseError(MDB_ERROR, null, null, Index: pear/MDB/MDB/mssql.php diff -u pear/MDB/MDB/mssql.php:1.45 pear/MDB/MDB/mssql.php:1.46 --- pear/MDB/MDB/mssql.php:1.45 Tue Sep 23 09:43:25 2003 +++ pear/MDB/MDB/mssql.php Tue Sep 30 15:04:31 2003 @@ -43,7 +43,7 @@ // | Author: Frank M. Kromann <frank@kromann.info> | // +----------------------------------------------------------------------+ // -// $Id: mssql.php,v 1.45 2003/09/23 13:43:25 lsmith Exp $ +// $Id: mssql.php,v 1.46 2003/09/30 19:04:31 lsmith Exp $ // require_once 'MDB/Common.php'; @@ -533,9 +533,9 @@ function numRows($result) { if ($this->options['result_buffering']) { - $result_value = intval($result); - if (isset($this->results[$result_value]['ranges'])) { - return count($this->results[$result_value]['ranges']); + if (!isset($this->results[intval($result)])) { + return $this->raiseError(MDB_ERROR, null, null, + 'numRows: attempted to check the end of an unknown result'); } return mssql_num_rows($result); } Index: pear/MDB/MDB/fbsql.php diff -u pear/MDB/MDB/fbsql.php:1.46 pear/MDB/MDB/fbsql.php:1.47 --- pear/MDB/MDB/fbsql.php:1.46 Tue Sep 23 09:43:25 2003 +++ pear/MDB/MDB/fbsql.php Tue Sep 30 15:04:31 2003 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: fbsql.php,v 1.46 2003/09/23 13:43:25 lsmith Exp $ +// $Id: fbsql.php,v 1.47 2003/09/30 19:04:31 lsmith Exp $ // require_once 'MDB/Common.php'; @@ -506,6 +506,10 @@ function numRows($result) { if ($this->options['result_buffering']) { + if (!isset($this->results[intval($result)])) { + return $this->raiseError(MDB_ERROR, null, null, + 'numRows: attempted to check the end of an unknown result'); + } return fbsql_num_rows($result); } return $this->raiseError(MDB_ERROR, null, null,

« previous php.pear.cvs (#13193) next »