summaryrefslogtreecommitdiff
path: root/ext/mssql/php_mssql.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2008-03-05 23:53:23 +0000
committerIlia Alshanetsky <iliaa@php.net>2008-03-05 23:53:23 +0000
commitabc636346237b98e9d049d9cac0317d3286a0d52 (patch)
tree35cee0305695b08cc6ad3445f8b3a3d0770eeac8 /ext/mssql/php_mssql.c
parent77fee69a7e0063ceddaf20e99da2e1b6d2ba0758 (diff)
downloadphp-git-abc636346237b98e9d049d9cac0317d3286a0d52.tar.gz
MFB: Revert patch for bug #44325
Diffstat (limited to 'ext/mssql/php_mssql.c')
-rw-r--r--ext/mssql/php_mssql.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c
index 7ad75912f2..c91b98d7dd 100644
--- a/ext/mssql/php_mssql.c
+++ b/ext/mssql/php_mssql.c
@@ -2063,19 +2063,14 @@ PHP_FUNCTION(mssql_bind)
/* modify datalen and maxlen according to dbrpcparam documentation */
if ( (type==SQLVARCHAR) || (type==SQLCHAR) || (type==SQLTEXT) ) { /* variable-length type */
- if (is_null || Z_TYPE_PP(var) == IS_NULL) {
+ if (is_null) {
maxlen=0;
datalen=0;
- } else {
+ }
+ else {
convert_to_string_ex(var);
- datalen = Z_STRLEN_PP(var);
- value = (LPBYTE)Z_STRVAL_PP(var);
- if (!datalen) {
- datalen = 1;
- if (maxlen == -1) {
- maxlen = 1;
- }
- }
+ datalen=Z_STRLEN_PP(var);
+ value=(LPBYTE)Z_STRVAL_PP(var);
}
}
else { /* fixed-length type */