From f7f74b4c0eec65e2232d0d7f3f59e87936d07341 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Sun, 20 Jun 2010 14:12:06 +0000 Subject: [PATCH] - Completed the fix for bug #52010 # Fixing pdo drivers --- ext/pdo_sqlite/sqlite_driver.c | 2 +- ext/sqlite/pdo_sqlite2.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c index e0f53bebc0..0f6f32310e 100644 --- a/ext/pdo_sqlite/sqlite_driver.c +++ b/ext/pdo_sqlite/sqlite_driver.c @@ -636,7 +636,7 @@ static struct pdo_dbh_methods sqlite_methods = { static char *make_filename_safe(const char *filename TSRMLS_DC) { - if (strncmp(filename, ":memory:", sizeof(":memory:")-1)) { + if (*filename && strncmp(filename, ":memory:", sizeof(":memory:")-1)) { char *fullpath = expand_filepath(filename, NULL TSRMLS_CC); if (!fullpath) { diff --git a/ext/sqlite/pdo_sqlite2.c b/ext/sqlite/pdo_sqlite2.c index 10f716f673..d7921e791d 100644 --- a/ext/sqlite/pdo_sqlite2.c +++ b/ext/sqlite/pdo_sqlite2.c @@ -515,7 +515,7 @@ static struct pdo_dbh_methods sqlite2_methods = { static char *make_filename_safe(const char *filename TSRMLS_DC) { - if (strncmp(filename, ":memory:", sizeof(":memory:")-1)) { + if (*filename && strncmp(filename, ":memory:", sizeof(":memory:")-1)) { char *fullpath = expand_filepath(filename, NULL TSRMLS_CC); if (!fullpath) { -- 2.49.0