mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.1'
* PHP-8.1: Fix handling of single-key connection strings
This commit is contained in:
commit
e7f6acd068
3 changed files with 10 additions and 2 deletions
6
NEWS
6
NEWS
|
@ -14,6 +14,12 @@ PHP NEWS
|
|||
. Backwards-compatible mappings for 0x5C/0x7E in Shift-JIS are restored,
|
||||
after they had been changed in 8.1.0. (Alex Dowad)
|
||||
|
||||
- ODBC:
|
||||
. Fixed handling of single-key connection strings. (Calvin Buckley)
|
||||
|
||||
- PDO_ODBC:
|
||||
. Fixed handling of single-key connection strings. (Calvin Buckley)
|
||||
|
||||
- Standard:
|
||||
. Deprecated utf8_encode() and utf8_decode(). (Rowan Tommins)
|
||||
|
||||
|
|
|
@ -2173,7 +2173,8 @@ int odbc_sqlconnect(odbc_connection **conn, char *db, char *uid, char *pwd, int
|
|||
char *ldb = 0;
|
||||
int ldb_len = 0;
|
||||
|
||||
if (strstr((char*)db, ";")) {
|
||||
/* a connection string may have = but not ; - i.e. "DSN=PHP" */
|
||||
if (strstr((char*)db, "=")) {
|
||||
direct = 1;
|
||||
/* Force UID and PWD to be set in the DSN */
|
||||
bool is_uid_set = uid && *uid
|
||||
|
|
|
@ -480,7 +480,8 @@ static int pdo_odbc_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /* {{{
|
|||
goto fail;
|
||||
}
|
||||
|
||||
if (strchr(dbh->data_source, ';')) {
|
||||
/* a connection string may have = but not ; - i.e. "DSN=PHP" */
|
||||
if (strchr(dbh->data_source, '=')) {
|
||||
SQLCHAR dsnbuf[1024];
|
||||
SQLSMALLINT dsnbuflen;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue