diff options
Diffstat (limited to 'ext/pdo_sqlite')
| -rw-r--r-- | ext/pdo_sqlite/config.m4 | 2 | ||||
| -rw-r--r-- | ext/pdo_sqlite/config.w32 | 4 | ||||
| -rw-r--r-- | ext/pdo_sqlite/pdo_sqlite.c | 2 | ||||
| -rw-r--r-- | ext/pdo_sqlite/php_pdo_sqlite.h | 2 | ||||
| -rw-r--r-- | ext/pdo_sqlite/php_pdo_sqlite_int.h | 2 | ||||
| -rw-r--r-- | ext/pdo_sqlite/sqlite_driver.c | 2 | ||||
| -rw-r--r-- | ext/pdo_sqlite/sqlite_statement.c | 2 | ||||
| -rw-r--r-- | ext/pdo_sqlite/tests/bug48773.phpt | 34 |
8 files changed, 42 insertions, 8 deletions
diff --git a/ext/pdo_sqlite/config.m4 b/ext/pdo_sqlite/config.m4 index 9158d2cb5..1735f0f47 100644 --- a/ext/pdo_sqlite/config.m4 +++ b/ext/pdo_sqlite/config.m4 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.26.2.9.2.7.2.8 2009/01/13 02:50:54 scottmac Exp $ +dnl $Id: config.m4 273413 2009-01-13 02:50:54Z scottmac $ dnl config.m4 for extension pdo_sqlite dnl vim:et:sw=2:ts=2: diff --git a/ext/pdo_sqlite/config.w32 b/ext/pdo_sqlite/config.w32 index b21a1ed0c..d1f159d4e 100644 --- a/ext/pdo_sqlite/config.w32 +++ b/ext/pdo_sqlite/config.w32 @@ -1,10 +1,10 @@ -// $Id: config.w32,v 1.6.2.1.2.3.2.8 2008/08/06 16:56:35 auroraeosrose Exp $ +// $Id: config.w32 287047 2009-08-10 16:58:53Z kalle $ // vim:ft=javascript ARG_WITH("pdo-sqlite", "for pdo_sqlite support", "no"); if (PHP_PDO_SQLITE != "no") { - EXTENSION("pdo_sqlite", "pdo_sqlite.c sqlite_driver.c sqlite_statement.c", null, "/DSQLITE_THREADSAFE=1 /I" + configure_module_dirname + "/../sqlite3/libsqlite /I" + configure_module_dirname); + EXTENSION("pdo_sqlite", "pdo_sqlite.c sqlite_driver.c sqlite_statement.c", null, "/DSQLITE_THREADSAFE=" + (PHP_ZTS == "yes" ? "1" : "0") + " /I" + configure_module_dirname + "/../sqlite3/libsqlite /I" + configure_module_dirname); ADD_EXTENSION_DEP('pdo_sqlite', 'pdo'); // If pdo_sqlite is static, and sqlite3 is also static, then we don't add a second copy of the sqlite3 libs diff --git a/ext/pdo_sqlite/pdo_sqlite.c b/ext/pdo_sqlite/pdo_sqlite.c index 6ec30089c..ba2b697f8 100644 --- a/ext/pdo_sqlite/pdo_sqlite.c +++ b/ext/pdo_sqlite/pdo_sqlite.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_sqlite.c,v 1.10.2.6.2.2.2.4 2008/12/31 11:15:41 sebastian Exp $ */ +/* $Id: pdo_sqlite.c 272370 2008-12-31 11:15:49Z sebastian $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/pdo_sqlite/php_pdo_sqlite.h b/ext/pdo_sqlite/php_pdo_sqlite.h index b3aeaad20..36bbb93a9 100644 --- a/ext/pdo_sqlite/php_pdo_sqlite.h +++ b/ext/pdo_sqlite/php_pdo_sqlite.h @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_sqlite.h,v 1.2.2.1.2.1.2.3 2008/12/31 11:15:41 sebastian Exp $ */ +/* $Id: php_pdo_sqlite.h 272370 2008-12-31 11:15:49Z sebastian $ */ #ifndef PHP_PDO_SQLITE_H diff --git a/ext/pdo_sqlite/php_pdo_sqlite_int.h b/ext/pdo_sqlite/php_pdo_sqlite_int.h index eaabe75a3..4deb99652 100644 --- a/ext/pdo_sqlite/php_pdo_sqlite_int.h +++ b/ext/pdo_sqlite/php_pdo_sqlite_int.h @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_sqlite_int.h,v 1.3.2.1.2.1.2.2 2008/12/31 11:15:41 sebastian Exp $ */ +/* $Id: php_pdo_sqlite_int.h 272370 2008-12-31 11:15:49Z sebastian $ */ #ifndef PHP_PDO_SQLITE_INT_H #define PHP_PDO_SQLITE_INT_H diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c index c18ecb7cf..f16e17e06 100644 --- a/ext/pdo_sqlite/sqlite_driver.c +++ b/ext/pdo_sqlite/sqlite_driver.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sqlite_driver.c,v 1.20.2.5.2.2.2.6 2008/12/31 11:15:41 sebastian Exp $ */ +/* $Id: sqlite_driver.c 272370 2008-12-31 11:15:49Z sebastian $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/pdo_sqlite/sqlite_statement.c b/ext/pdo_sqlite/sqlite_statement.c index 54579e827..d8e5049df 100644 --- a/ext/pdo_sqlite/sqlite_statement.c +++ b/ext/pdo_sqlite/sqlite_statement.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sqlite_statement.c,v 1.18.2.4.2.3.2.10 2009/05/20 15:05:36 iliaa Exp $ */ +/* $Id: sqlite_statement.c 280873 2009-05-20 15:05:36Z iliaa $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/pdo_sqlite/tests/bug48773.phpt b/ext/pdo_sqlite/tests/bug48773.phpt new file mode 100644 index 000000000..b8bdea918 --- /dev/null +++ b/ext/pdo_sqlite/tests/bug48773.phpt @@ -0,0 +1,34 @@ +--TEST-- +Bug #48773 (Incorrect error when setting PDO::ATTR_STATEMENT_CLASS with ctor_args) +--SKIPIF-- +<?php +if (!extension_loaded('pdo_sqlite')) print 'skip not loaded'; +?> +--FILE-- +<?php + +class bar extends PDOStatement { + private function __construct() { + } +} + +class foo extends PDO { + public $statementClass = 'bar'; + function __construct($dsn, $username, $password, $driver_options = array()) { + $driver_options[PDO::ATTR_ERRMODE] = PDO::ERRMODE_EXCEPTION; + parent::__construct($dsn, $username, $password, $driver_options); + + $this->setAttribute(PDO::ATTR_STATEMENT_CLASS, array($this->statementClass, array($this))); + } +} + +$db = new foo('sqlite::memory:', '', ''); +$stmt = $db->query('SELECT 1'); +var_dump($stmt); + +?> +--EXPECTF-- +object(bar)#%d (1) { + [%u|b%"queryString"]=> + %unicode|string%(8) "SELECT 1" +} |
