summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2009-12-06 19:34:12 +0000
committerIlia Alshanetsky <iliaa@php.net>2009-12-06 19:34:12 +0000
commitc21c2da229a96a0b260a191a77a827026c5f8a5c (patch)
tree55bb47ff676b5e6c62aca52788092c5dedc92ca8
parentbe06106d62db89c8b046f1708e49b05636d1100f (diff)
downloadphp-git-c21c2da229a96a0b260a191a77a827026c5f8a5c.tar.gz
Fixed bug #50323 (Allow use of ; in values via ;; in PDO DSN).
-rw-r--r--NEWS1
-rwxr-xr-xext/pdo/pdo.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 4370736e44..2a502d7295 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@ PHP NEWS
- Fixed bug #50345 (nanosleep not detected properly on some solaris versions).
(Jani)
+- Fixed bug #50323 (Allow use of ; in values via ;; in PDO DSN). (Ilia)
- Fixed bug #50266 (conflicting types for llabs). (Jani)
- Fixed bug #50168 (FastCGI fails with wrong error on HEAD request to
non-existent file). (Dmitry)
diff --git a/ext/pdo/pdo.c b/ext/pdo/pdo.c
index 048809775d..3187543187 100755
--- a/ext/pdo/pdo.c
+++ b/ext/pdo/pdo.c
@@ -240,7 +240,7 @@ PDO_API int php_pdo_parse_data_source(const char *data_source,
semi = i++;
break;
}
- if (data_source[i] == ';') {
+ if (data_source[i] == ';' && ((i + 1 >= data_source_len) || data_source[i+1] != ';')) {
semi = i++;
break;
}