cvs: php4 /pear/DB mysql.php
| From: | Thomas V.V.Cox | Date: | Wed, 15 Aug 2001 23:22:33 +0000 |
| Subject: | cvs: php4 /pear/DB mysql.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-542@lists.php.net to get a copy of this message | ||
cox Wed Aug 15 19:22:33 2001 EDT
Modified files:
/php4/pear/DB mysql.php
Log:
fix free result in tableInfo (reported by "Yermo M. Lamers" <yml@dtlink.com>)
Index: php4/pear/DB/mysql.php
diff -u php4/pear/DB/mysql.php:1.69 php4/pear/DB/mysql.php:1.70
--- php4/pear/DB/mysql.php:1.69 Tue Jul 31 19:19:13 2001
+++ php4/pear/DB/mysql.php Wed Aug 15 19:22:32 2001
@@ -656,7 +656,7 @@
$res[$i]['flags'] = @mysql_field_flags ($id, $i);
}
} else { // full
- $res["num_fields"]= $count;
+ $res['num_fields']= $count;
for ($i=0; $i<$count; $i++) {
$res[$i]['table'] = @mysql_field_table ($id, $i);
@@ -674,7 +674,7 @@
}
// free the result only if we were called on a table
- if ($table) {
+ if (is_resource($result)) {
@mysql_free_result($id);
}
return $res;