diff --git a/ibm_db2.c b/ibm_db2.c index 0862910..5ee0c5c 100644 --- a/ibm_db2.c +++ b/ibm_db2.c @@ -4584,6 +4584,11 @@ static int _php_db2_bind_data( stmt_handle *stmt_res, param_node *curr, zval **b paramValuePtr = (SQLPOINTER)(Z_STRVAL_P(curr->value)); break; case SQL_VARCHAR: + case SQL_WVARCHAR: + case SQL_VARGRAPHIC: + case SQL_LONGVARCHAR: + case SQL_WLONGVARCHAR: + case SQL_LONGVARGRAPHIC: valueType = SQL_C_CHAR; if (origlen != -1) { curr->bind_indicator = origlen; diff --git a/tests/test_gh_62.phpt b/tests/test_gh_62.phpt new file mode 100644 index 0000000..5546c01 --- /dev/null +++ b/tests/test_gh_62.phpt @@ -0,0 +1,40 @@ +--TEST-- +IBM-DB2: Binding empty string to NVARCHAR (GH-62) +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +success +