Re: Re: [PDO] Breaking the PDO API

From: Date: Wed, 15 Apr 2009 23:47:40 +0000
Subject: Re: Re: [PDO] Breaking the PDO API
References: 1 2  Groups: php.pecl.dev php.pdo 
Request: Send a blank email to pecl-dev+get-6321@lists.php.net to get a copy of this message
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

« previous php.pecl.dev (#6321) next »