summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2010-06-20 14:12:06 +0000
committerFelipe Pena <felipe@php.net>2010-06-20 14:12:06 +0000
commitc6e852d7dbe47a08e911411481f4a84992dfe8fc (patch)
treebecaf2bdc2480febb9b41314c27e02d79f1f9113
parentffdd175918818f07647ee5b2a36d19bd20077a27 (diff)
downloadphp-git-c6e852d7dbe47a08e911411481f4a84992dfe8fc.tar.gz
- Completed the fix for bug #52010
# Fixing pdo drivers
-rw-r--r--ext/pdo_sqlite/sqlite_driver.c2
-rw-r--r--ext/sqlite/pdo_sqlite2.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c
index 7ad7722c9d..3b611b28be 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 3e8d2f8f2b..18c5864a1b 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) {