summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pdo_sqlite')
-rw-r--r--ext/pdo_sqlite/sqlite_driver.c4
-rw-r--r--ext/pdo_sqlite/tests/bug70221.phpt5
2 files changed, 4 insertions, 5 deletions
diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c
index 346cdf2f27..4e729aab0e 100644
--- a/ext/pdo_sqlite/sqlite_driver.c
+++ b/ext/pdo_sqlite/sqlite_driver.c
@@ -325,9 +325,7 @@ static int do_callback(struct pdo_sqlite_fci *fc, zval *cb,
fake_argc = argc + is_agg;
fc->fci.size = sizeof(fc->fci);
- fc->fci.function_table = EG(function_table);
ZVAL_COPY_VALUE(&fc->fci.function_name, cb);
- fc->fci.symbol_table = NULL;
fc->fci.object = NULL;
fc->fci.retval = &retval;
fc->fci.param_count = fake_argc;
@@ -476,9 +474,7 @@ static int php_sqlite3_collation_callback(void *context,
struct pdo_sqlite_collation *collation = (struct pdo_sqlite_collation*) context;
collation->fc.fci.size = sizeof(collation->fc.fci);
- collation->fc.fci.function_table = EG(function_table);
ZVAL_COPY_VALUE(&collation->fc.fci.function_name, &collation->callback);
- collation->fc.fci.symbol_table = NULL;
collation->fc.fci.object = NULL;
collation->fc.fci.retval = &retval;
diff --git a/ext/pdo_sqlite/tests/bug70221.phpt b/ext/pdo_sqlite/tests/bug70221.phpt
index 1ee2378bc6..2d1aea0e8b 100644
--- a/ext/pdo_sqlite/tests/bug70221.phpt
+++ b/ext/pdo_sqlite/tests/bug70221.phpt
@@ -6,10 +6,13 @@ if (!extension_loaded('pdo_sqlite')) print 'skip not loaded';
?>
--FILE--
<?php
-$db = new PDO('sqlite:test.sqlite', null, null, array(PDO::ATTR_PERSISTENT => true));
+$dbfile = __DIR__ . '/test.sqlite';
+$db = new PDO('sqlite:'.$dbfile, null, null, array(PDO::ATTR_PERSISTENT => true));
function _test() { return 42; }
$db->sqliteCreateFunction('test', '_test', 0);
print("Everything is fine, no exceptions here\n");
+unset($db);
+@unlink($dbfile);
?>
--EXPECT--
Everything is fine, no exceptions here