PHP 4.0 Bug #6831 Updated: COM does not support variant type 1 (NULL)
| From: | phanto@php.net | Date: | Wed, 31 Jan 2001 00:04:11 +0000 |
| Subject: | PHP 4.0 Bug #6831 Updated: COM does not support variant type 1 (NULL) | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-45393@lists.php.net to get a copy of this message | ||
ID: 6831
Updated by: phanto
Reported By: jlim@natsoft.com.my
Old-Status: Assigned
Status: Closed
Bug Type: COM related
Assigned To: phanto
Comments:
fixed in cvs
use is_null() to check if the returned value is NULL;
Previous Comments:
---------------------------------------------------------------------------
[2001-01-29 17:21:24] phanto@php.net
working on it
---------------------------------------------------------------------------
[2000-12-18 04:36:12] jlim@natsoft.com.my
Here's hoping for a quick fix :-) PHP 4.03pl1 also exhibits the above bug.
Just tested COM again and discovered variant type 6 (currency) is not supported either.
Thanks again.
---------------------------------------------------------------------------
[2000-09-21 11:06:54] jlim@natsoft.com.my
Currently, COM does not support variant type 1. This is type NULL.
This should be easy to fix as we can make it equivalent to false. Does PHP support null as a
constant?
The bug can be replicated by accessing a database with nulls in the records using ADO.
<?
$dbc = new COM("ADODB.Connection");
$dbc->open ("driver={Microsoft Access Driver
(*.mdb)};dbq=d:/test/DB/guestbook.mdb;uid=Admin");
$rs = $dbc->Execute("select * from guestbook");
$i = 0;
while (!$rs->EOF) {
$i += 1;
$fld0 = $rs->Fields(0);
$fld1 = $rs->Fields(1);
$fld2 = $rs->Fields(2);
print "$fld0->value $fld1->value $fld2->value<BR>";
$rs->MoveNext();
}
$rs->Close();
?>
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=6831