summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2016-05-03 19:55:55 +0100
committerJakub Zelenka <bukka@php.net>2016-05-03 19:55:55 +0100
commitafb4062c2c66d3080c08693af47c670bb63c285e (patch)
tree4c860a31501a3dadf59c0b9322f7f52764ae75d3 /ext/pdo_sqlite
parent37048c0f6cef53b015c04c8370f94e6597588fdc (diff)
parent34a9882ad357620ccec2bfadba72fce027acd3d6 (diff)
downloadphp-git-afb4062c2c66d3080c08693af47c670bb63c285e.tar.gz
Merge branch 'json_parser_method' into json_parser_method_embed
Diffstat (limited to 'ext/pdo_sqlite')
-rw-r--r--ext/pdo_sqlite/sqlite_driver.c2
-rw-r--r--ext/pdo_sqlite/tests/bug70221.phpt5
2 files changed, 4 insertions, 3 deletions
diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c
index 8c732b9dbe..4e729aab0e 100644
--- a/ext/pdo_sqlite/sqlite_driver.c
+++ b/ext/pdo_sqlite/sqlite_driver.c
@@ -325,7 +325,6 @@ 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.object = NULL;
fc->fci.retval = &retval;
@@ -475,7 +474,6 @@ 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.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