From: daigo75 at wooow dot it Operating system: Windows 2000 Professional/Server PHP version: 5.0.5 PHP Bug Type: MSSQL related Bug description: Empty string converted to null using bind function
Description: ------------ Hello! I call a stored procedure as follows: $sp=mssql_init("spTest"); $VarTemp=''; mssql_bind($sp,"@Param1",$VarTemp,SQLVARCHAR,0,false,100); $ResultSet = mssql_execute($sp); When param "@Param1" is passed to stored procedure, it gets null instead of an empty string. Note that "Is_Null" parameter is set to false. Reproduce code: --------------- $sp=mssql_init("spTest"); $VarTemp=''; mssql_bind($sp,"@Param1",$VarTemp,SQLVARCHAR,0,false,100); $ResultSet = mssql_execute($sp); Expected result: ---------------- Stored procedure should receive an empty string as value of "@Param1" parameter. Actual result: -------------- Stored procedure receives NULL as value of "@Param1" parameter. -- Edit bug report at http://bugs.php.net/?id=34410&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34410&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34410&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34410&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34410&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34410&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34410&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34410&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34410&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34410&r=support Expected behavior: http://bugs.php.net/fix.php?id=34410&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34410&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34410&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34410&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34410&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34410&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34410&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34410&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34410&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34410&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34410&r=mysqlcfg