This commit is contained in:
Jenny Tam 2020-10-14 19:38:33 -07:00 коммит произвёл GitHub
Родитель c6b198c5e9
Коммит 20f7a13ef0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6 изменённых файлов: 17 добавлений и 19 удалений

Просмотреть файл

@ -30,7 +30,7 @@ environment:
SQL_INSTANCE: SQL2019
PHP_VC: vs16
PHP_MAJOR_VER: 8.0
PHP_MINOR_VER: 0rc1
PHP_MINOR_VER: 0RC2
PHP_EXE_PATH: Release
THREAD: nts
platform: x86

Просмотреть файл

@ -912,6 +912,8 @@ int pdo_sqlsrv_dbh_begin( _Inout_ pdo_dbh_t *dbh )
DIE ("pdo_sqlsrv_dbh_begin: Uncaught exception occurred.");
}
// Should not have reached here but adding this due to compilation warnings
return 0;
}
@ -954,6 +956,8 @@ int pdo_sqlsrv_dbh_commit( _Inout_ pdo_dbh_t *dbh )
DIE ("pdo_sqlsrv_dbh_commit: Uncaught exception occurred.");
}
// Should not have reached here but adding this due to compilation warnings
return 0;
}
// pdo_sqlsrv_dbh_rollback
@ -993,6 +997,8 @@ int pdo_sqlsrv_dbh_rollback( _Inout_ pdo_dbh_t *dbh )
DIE ("pdo_sqlsrv_dbh_rollback: Uncaught exception occurred.");
}
// Should not have reached here but adding this due to compilation warnings
return 0;
}
// pdo_sqlsrv_dbh_set_attr

Просмотреть файл

@ -724,6 +724,8 @@ int pdo_sqlsrv_stmt_fetch( _Inout_ pdo_stmt_t *stmt, _In_ enum pdo_fetch_orienta
DIE ("pdo_sqlsrv_stmt_fetch: Unexpected exception occurred.");
}
// Should not have reached here but adding this due to compilation warnings
return 0;
}
// pdo_sqlsrv_stmt_get_col_data
@ -832,15 +834,16 @@ int pdo_sqlsrv_stmt_get_col_data( _Inout_ pdo_stmt_t *stmt, _In_ int colno,
*len = sizeof(zval);
}
return 1;
}
return 1;
}
catch ( core::CoreException& ) {
return 0;
}
catch ( ... ) {
DIE ("pdo_sqlsrv_stmt_get_col_data: Unexpected exception occurred.");
}
// Should not have reached here but adding this due to compilation warnings
return 0;
}
// pdo_sqlsrv_stmt_set_attr

Просмотреть файл

@ -635,20 +635,9 @@ void add_remaining_errors_to_array (_In_ sqlsrv_error const* error, _Inout_ zval
if (error->next != NULL && PDO_SQLSRV_G(report_additional_errors)) {
sqlsrv_error *p = error->next;
while (p != NULL) {
// check if sql state or native message is NULL and handle them accordingly
char *state = "";
char *msg = "";
if (p->sqlstate != NULL) {
state = reinterpret_cast<char*>(p->sqlstate);
}
if (p->native_message != NULL) {
msg = reinterpret_cast<char*>(p->native_message);
}
add_next_index_string(array_z, state);
add_next_index_string(array_z, reinterpret_cast<char*>(p->sqlstate));
add_next_index_long(array_z, p->native_code);
add_next_index_string(array_z, msg);
add_next_index_string(array_z, reinterpret_cast<char*>(p->native_message));
p = p-> next;
}

Просмотреть файл

@ -58,7 +58,7 @@ function fetchBoth($conn, $tbname)
echo "Expect getColumnMeta to fail with -1\n";
} catch (Error $e) {
if (PHP_MAJOR_VERSION == 8) {
$error = '*PDOStatement::getColumnMeta(): Argument #1 ($index) must be greater than or equal to 0*';
$error = '*PDOStatement::getColumnMeta(): Argument #1 ($column) must be greater than or equal to 0*';
} else {
$error = '*Invalid column reference: column number must be non-negative*';
}

Просмотреть файл

@ -63,7 +63,7 @@ function fetchBoth($conn, $tbname)
echo "Expect getColumnMeta to fail with -1\n";
} catch (Error $e) {
if (PHP_MAJOR_VERSION == 8) {
$error = '*PDOStatement::getColumnMeta(): Argument #1 ($index) must be greater than or equal to 0*';
$error = '*PDOStatement::getColumnMeta(): Argument #1 ($column) must be greater than or equal to 0*';
} else {
$error = '*Invalid column reference: column number must be non-negative*';
}