mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
Closes PECL Bug #5750; uri: dsn is not handled correctly.
Patch from curt@php.net
This commit is contained in:
parent
ecca329c14
commit
ea544cf38f
1 changed files with 1 additions and 1 deletions
|
@ -252,7 +252,7 @@ static PHP_METHOD(PDO, dbh_constructor)
|
|||
|
||||
if (!strncmp(data_source, "uri:", sizeof("uri:")-1)) {
|
||||
/* the specified URI holds connection details */
|
||||
data_source = dsn_from_uri(data_source, alt_dsn, sizeof(alt_dsn) TSRMLS_CC);
|
||||
data_source = dsn_from_uri(data_source + sizeof("uri:")-1, alt_dsn, sizeof(alt_dsn) TSRMLS_CC);
|
||||
if (!data_source) {
|
||||
zend_throw_exception_ex(php_pdo_get_exception(), 0 TSRMLS_CC, "invalid data source URI");
|
||||
ZVAL_NULL(object);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue