Skip to content

Commit 3397bd4

Browse files
committed
Some instances are harmless and can be ignored
1 parent af3d66c commit 3397bd4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ibm_db2.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,8 +1081,12 @@ static void _php_db2_check_sql_errors( SQLHANDLE handle, SQLSMALLINT hType, int
10811081
default:
10821082
break;
10831083
}
1084-
} else {
1085-
php_error_docref(NULL, E_WARNING, "SQLGetDiagRec failed (is the driver working?)");
1084+
/*
1085+
* Some conversion errors in tests will return -1 and poke this function,
1086+
* but there won't be any SQL errors to get, so don't cause a false alarm
1087+
*/
1088+
} else if (sqlrc != SQL_NO_DATA_FOUND) {
1089+
php_error_docref(NULL, E_WARNING, "SQLGetDiagRec returned %d (is the driver working?)", sqlrc);
10861090
}
10871091
}
10881092
/* }}} */

0 commit comments

Comments
 (0)