Skip to content

Commit c822c2d

Browse files
committed
Merge branch 'PHP-8.2'
* PHP-8.2: Remove CTE flag from array_diff_ukey(), which was added by mistake Fix missing and inconsistent error check on SQLAllocHandle
2 parents 90a39fd + 5239f9f commit c822c2d

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

ext/pdo_odbc/odbc_driver.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ static zend_long odbc_handle_doer(pdo_dbh_t *dbh, const zend_string *sql)
222222
PDO_ODBC_HSTMT stmt;
223223

224224
rc = SQLAllocHandle(SQL_HANDLE_STMT, H->dbc, &stmt);
225-
if (rc != SQL_SUCCESS) {
225+
if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) {
226226
pdo_odbc_drv_error("SQLAllocHandle: STMT");
227227
return -1;
228228
}
@@ -449,7 +449,12 @@ static int pdo_odbc_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /* {{{
449449

450450
dbh->driver_data = H;
451451

452-
SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &H->env);
452+
rc = SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &H->env);
453+
if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) {
454+
pdo_odbc_drv_error("SQLAllocHandle: ENV");
455+
goto fail;
456+
}
457+
453458
rc = SQLSetEnvAttr(H->env, SQL_ATTR_ODBC_VERSION, (void*)SQL_OV_ODBC3, 0);
454459

455460
if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) {
@@ -469,7 +474,7 @@ static int pdo_odbc_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /* {{{
469474

470475
rc = SQLAllocHandle(SQL_HANDLE_DBC, H->env, &H->dbc);
471476
if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) {
472-
pdo_odbc_drv_error("SQLAllocHandle (DBC)");
477+
pdo_odbc_drv_error("SQLAllocHandle: DBC");
473478
goto fail;
474479
}
475480

ext/standard/basic_functions.stub.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1786,7 +1786,6 @@ function array_diff_key(array $array, array ...$arrays): array {}
17861786
/**
17871787
* @param array|callable $rest
17881788
* @refcount 1
1789-
* @compile-time-eval
17901789
*/
17911790
function array_diff_ukey(array $array, ...$rest): array {}
17921791

ext/standard/basic_functions_arginfo.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)