From 31321a87ac7c69defc7c43e8147b49fb964cd985 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 --- NEWS | 2 ++ ext/pdo_sqlite/sqlite_driver.c | 2 +- ext/sqlite/pdo_sqlite2.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 9dec0acc982..9922a66f24a 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? Jun 2010, PHP 5.2.14 - Fixed bug #52061 (memory_limit above 2G). (Felipe) +- Fixed bug #52010 (open_basedir restrictions mismatch on vacuum command). + (Ilia, Felipe) 17 Jun 2010, PHP 5.2.14RC1 - Upgraded bundled PCRE to version 8.02. (Ilia) diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c index d11d5735be4..4173c0b8f76 100644 --- a/ext/pdo_sqlite/sqlite_driver.c +++ b/ext/pdo_sqlite/sqlite_driver.c @@ -642,7 +642,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 9943b3e0863..3533e4b994d 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) {