php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53966 convertion NULL value in integer 0
Submitted: 2011-02-09 00:21 UTC Modified: 2014-12-30 10:41 UTC
From: julien dot fabre at pg-soft dot fr Assigned:
Status: No Feedback Package: MSSQL related
PHP Version: 5.2.17 OS: Windows XP SP3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: julien dot fabre at pg-soft dot fr
New email:
PHP Version: OS:

 

 [2011-02-09 00:21 UTC] julien dot fabre at pg-soft dot fr
Description:
------------
---
From manual page: http://www.php.net/function.mssql-fetch-object#Valeurs de retour
---

System 	Windows NT BLISS 5.1 build 2600
Build Date 	Jul 21 2010 18:41:42
Configure Command 	cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--with-snapshot-template=d:\php-sdk\snap_5_2\vc6\x86\template" "--with-php-build=d:\php-sdk\snap_5_2\vc6\x86\php_build" "--with-pdo-oci=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=D:\php-sdk\oracle\instantclient10\sdk,shared" "--without-pi3web"
Server API 	Apache 2.0 Handler
Virtual Directory Support 	enabled
Configuration File (php.ini) Path 	C:\WINDOWS
Loaded Configuration File 	C:\WINDOWS\php.ini
Scan this dir for additional .ini files 	(none)
additional .ini files parsed 	(none)
PHP API 	20041225
PHP Extension 	20060613
Zend Extension 	220060519
Debug Build 	no
Thread Safety 	enabled
Zend Memory Manager 	enabled
IPv6 Support 	enabled
Registered PHP Streams 	php, file, data, http, ftp, compress.zlib, zip, sqlsrv
Registered Stream Socket Transports 	tcp, udp
Registered Stream Filters 	convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, zlib.*



Test script:
---------------
in MS SQL server 2000 :
Foo bit null authorised
Bar integer null authorised

select Foo , Bar from BF 

result  in MS SQL: 
 <NULL>,<NULL> 


in php you have  0,NULL 

a bit at NULL is automaticly convert to 0 

Expected result:
----------------
you must have 

result   in MS SQL: 
 <NULL>,<NULL> 


in php you have  NULL,NULL 



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-07-15 22:35 UTC] yohgaki@php.net
-Status: Open +Status: Feedback
 [2014-07-15 22:35 UTC] yohgaki@php.net
I don't see vote for this bug. Do you still have this problem?
 [2014-12-30 10:41 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 21:01:36 2024 UTC