Re: Re: [PDO] Breaking the PDO API
| From: | Ilia Alshanetsky | Date: | Thu, 16 Apr 2009 00:07:46 +0000 |
| Subject: | Re: Re: [PDO] Breaking the PDO API | ||
| References: | 1 2 3 4 | Groups: | php.pecl.dev php.pdo |
| Request: | Send a blank email to pecl-dev+get-6325@lists.php.net to get a copy of this message | ||
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:--PECL development discussion Mailing List (http://pecl.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpI 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