Re: [PECL-DEV] Re: [PDO] Breaking the PDO API
[email protected] (Ilia Alshanetsky) Wed, 15 Apr 2009 20:07:46 -0400
| Newsgroups | php.pecl.dev,php.pdo |
|---|---|
| Message-ID | <[email protected]> |
To me Wez's fix seems like the simplest solution. Ilia Alshanetsky On 15-Apr-09, at 7:52 PM, Wez Furlong wrote: > Any objection to fixing this in the drivers themselves (as I > suggested)? > It seems like the easiest fix, and doesn't introduce a massive > change to the code. > > --Wez. > > On Apr 15, 2009, at 7:47 PM, Matteo Beccati wrote: > >> Wez Furlong ha scritto: >>> I found the patch... can you explain the nature of the crash and >>> which >>> driver(s) it affects? >>> Your patch is huge, and it seems to me that the right fix is to >>> prevent >>> drivers from returning empty strings when the expectation is a LOB; >>> either return NULL or make a LOB with no content. >> >> The pgsql driver is surely affected. The oci driver might be >> affected, >> although I don't have enough experience with it to verify. >> >> From what I can see the problem is that the get_col API can set value >> either to a (php_stream *) or a (char *). The check on value[0] was >> added to fix http://bugs.php.net/bug.php?id=46274, to prevent the >> stream >> related code to be run when an empty string is returned by the >> driver. >> >> As you've already seen my proposal was to an is_stream parameter to >> the >> get_col API to make sure PDO knows what it's expected to handle. >> >> >> Cheers >> >> -- >> Matteo Beccati >> >> OpenX - http://www.openx.org > > > -- > PECL development discussion Mailing List (http://pecl.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >