cvs: pear /MDB mysql.php
| From: | Lukas Smith | Date: | Fri, 17 May 2002 19:02:29 +0000 |
| Subject: | cvs: pear /MDB mysql.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-3910@lists.php.net to get a copy of this message | ||
lsmith Fri May 17 15:02:29 2002 EDT
Modified files:
/pear/MDB mysql.php
Log:
freeResult checks via isset() before doing unset()
Index: pear/MDB/mysql.php
diff -u pear/MDB/mysql.php:1.6 pear/MDB/mysql.php:1.7
--- pear/MDB/mysql.php:1.6 Fri May 17 10:11:16 2002
+++ pear/MDB/mysql.php Fri May 17 15:02:28 2002
@@ -2,7 +2,7 @@
/*
* mysql.php
*
- * @(#) $Header: /usr/repository/pear/MDB/mysql.php,v 1.6 2002/05/17 14:11:16 lsmith Exp $
+ * @(#) $Header: /usr/repository/pear/MDB/mysql.php,v 1.7 2002/05/17 19:02:28 lsmith Exp $
*
*/
@@ -286,9 +286,9 @@
function freeResult($result)
{
- unset($this->highest_fetched_row[$result]);
- unset($this->columns[$result]);
- unset($this->result_types[$result]);
+ if(isset($this->highest_fetched_row[$result]))
{unset($this->highest_fetched_row[$result]);}
+ if(isset($this->columns[$result])) {unset($this->columns[$result]);}
+ if(isset($this->result_types[$result])) {unset($this->result_types[$result]);}
return (mysql_free_result($result));
}