Skip to content

Commit 56d3b9d

Browse files
committed
Make sure trusted context options don't trigger on IBM i
It doesn't have these, and trying to do this will cause a function sequence error. Should fix GH-65.
1 parent cafae16 commit 56d3b9d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ibm_db2.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,6 +1310,7 @@ static void _php_db2_assign_options( void *handle, int type, char *opt_key, zval
13101310
} else {
13111311
php_error_docref(NULL, E_WARNING, "ROWCOUNT statement attribute can only be set on statement resources");
13121312
}
1313+
#ifndef PASE /* i5/OS no support yet */
13131314
} else if (!STRCASECMP(opt_key, "trustedcontext")) {
13141315
if (type == SQL_HANDLE_DBC ) { /* Checking for connection resource */
13151316
if(((conn_handle*)handle)->handle_active == 0) { /* Checking for live connection */
@@ -1385,6 +1386,7 @@ static void _php_db2_assign_options( void *handle, int type, char *opt_key, zval
13851386
} else {
13861387
php_error_docref(NULL, E_WARNING, "TRUSTED PASSWORD attribute can only be set on connection resources");
13871388
}
1389+
#endif
13881390
} else if (!STRCASECMP(opt_key, "query_timeout")) {
13891391
if (type == SQL_HANDLE_STMT) {
13901392
rc = SQLSetStmtAttr((SQLHSTMT)((stmt_handle*)handle)->hstmt, SQL_ATTR_QUERY_TIMEOUT, (SQLPOINTER)(uintptr_t)option_num, SQL_IS_UINTEGER );

0 commit comments

Comments
 (0)