#44835 [NEW]: DBLIB driver - Weird NULL behavior
| From: | alexandre at gaigalas dot net | Date: | Fri, 25 Apr 2008 19:08:34 +0000 |
| Subject: | #44835 [NEW]: DBLIB driver - Weird NULL behavior | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-124522@lists.php.net to get a copy of this message | ||
From: alexandre at gaigalas dot net
Operating system: SuSE Enterprise
PHP version: 5.2.5
PHP Bug Type: PDO related
Bug description: DBLIB driver - Weird NULL behavior
Description:
------------
Fetching data on BIT columns with NULL values return 0 (zero) instead of
NULL.
Reproduce code:
---------------
<?php
$db = new PDO('dblib:host=X;dbname=X', 'x', 'x');
print_r($db->query("SELECT CONVERT(BIT,NULL) AS
THIS_MUST_BE_BLANK")->fetch(PDO::FETCH_ASSOC));
Expected result:
----------------
Array ( [THIS_MUST_BE_BLANK] => )
Actual result:
--------------
Array ( [THIS_MUST_BE_BLANK] => 0 )
--
Edit bug report at http://bugs.php.net/?id=44835&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44835&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44835&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44835&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44835&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=44835&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44835&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44835&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44835&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44835&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44835&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=44835&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=44835&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44835&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44835&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44835&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44835&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44835&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44835&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44835&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44835&r=mysqlcfg