]> granicus.if.org Git - php/commitdiff
Fixed bug #41831 (pdo_sqlite prepared statements convert resources to
authorIlia Alshanetsky <iliaa@php.net>
Wed, 1 Aug 2007 22:45:31 +0000 (22:45 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 1 Aug 2007 22:45:31 +0000 (22:45 +0000)
strings).

NEWS
ext/pdo_sqlite/sqlite_statement.c

diff --git a/NEWS b/NEWS
index 6d391895f3da85735e4325907c8ce8d4df867f96..c46728ab34344b6c7eaca43070d8cc37736d8acd 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -122,6 +122,8 @@ PHP                                                                        NEWS
   date_create or new DateTime). (Derick)
 - Fixed bug #41833 (addChild() on a non-existent node, no node created, 
   getName() segfaults). (Rob)
+- Fixed bug #41831 (pdo_sqlite prepared statements convert resources to
+  strings). (Ilia)
 - Fixed bug #41815 (Concurrent read/write fails when EOF is reached). (Sascha)
 - Fixed bug #41813 (segmentation fault when using string offset as an object).
   (judas dot iscariote at gmail dot com, Tony)
index 8e58ff8367c9367f178045c9137553c23cc6e453..c831795246694def26dae04e94bcb24787cc0d37 100644 (file)
@@ -109,7 +109,7 @@ static int pdo_sqlite_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_d
                                                        php_stream *stm;
                                                        php_stream_from_zval_no_verify(stm, &param->parameter);
                                                        if (stm) {
-                                                               SEPARATE_ZVAL_IF_NOT_REF(&param->parameter);
+                                                               SEPARATE_ZVAL(&param->parameter);
                                                                Z_TYPE_P(param->parameter) = IS_STRING;
                                                                Z_STRLEN_P(param->parameter) = php_stream_copy_to_mem(stm,
                                                                        &Z_STRVAL_P(param->parameter), PHP_STREAM_COPY_ALL, 0);