Bug #44835 [Com]: DBLIB driver - Weird NULL behavior

From: Date: Thu, 20 Mar 2014 18:15:44 +0000
Subject: Bug #44835 [Com]: DBLIB driver - Weird NULL behavior
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184846@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=44835&edit=1 ID: 44835 Comment by: contact at nicolasbouliane dot com Reported by: alexandre at gaigalas dot net Summary: DBLIB driver - Weird NULL behavior Status: No Feedback Type: Bug Package: PDO related Operating System: SuSE Enterprise PHP Version: 5.2.5 Block user comment: N Private report: N New Comment: I am having the same issue with SQL Server 2008, dblib and PHP 5.3.19 Previous Comments: ------------------------------------------------------------------------ [2008-10-29 01:00:03] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2008-10-21 11:30:32] jani@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ ------------------------------------------------------------------------ [2008-04-25 19:08:34] alexandre at gaigalas dot net 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 this bug report at https://bugs.php.net/bug.php?id=44835&edit=1

« previous php.bugs (#184846) next »