Browse Source

- Completed the fix for bug #52010

# Fixing pdo drivers
experimental/lemon
Felipe Pena 16 years ago
parent
commit
f7f74b4c0e
  1. 2
      ext/pdo_sqlite/sqlite_driver.c
  2. 2
      ext/sqlite/pdo_sqlite2.c

2
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) {

2
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) {

Loading…
Cancel
Save