Re: bug in PEAR/DB/mysql.php line 533
| From: | Yermo M. Lamers | Date: | Wed, 15 Aug 2001 22:35:34 +0000 |
| Subject: | Re: bug in PEAR/DB/mysql.php line 533 | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-1512@lists.php.net to get a copy of this message | ||
I checked out the CVS version last night (I guess I should have checked
the latest version before posting ... sorry about that)
It's in tableInfo(), the last method in DB/mysql.php:
// free the result only if we were called on a table
if ($table) {
@mysql_free_result($id);
}
return $res;
}
// }}}
// TODO/wishlist:
// simpleFetch
// simpleGet
// longReadlen
// binmode
}
I have warnings turned on and I get an error on the if ($table) { line.
It looks like $table isn't initialized anywhere. The result needs to be
freed if we did a mysql_list_field() .. so it looks like that line needs
to be something like
if ( is_string( $result ) ) {
-- Yermo
On Thu, 16 Aug 2001, Tomas V.V.Cox wrote:
> "Yermo M. Lamers" wrote:
> >
> > if ( $table ) {
> >
> > should probably be something like
> >
> > if ( is_string( $result ) ) {
> >
> > because $table is not defined at that point.
> >
>
> I don't find this in the last CVS version. Could you give more info in
> what function you see the error?
>
>
> Thanks,
>
>
> Tomas V.V.Cox
>
---------------------------------------------------------------------
Try Personal Stock Monitor for Windows(tm) for FREE at:
http://www.personalstockmonitor.com
Powerful Desktop Software for Online Investors
---------------------------------------------------------------------