#29973 [Opn->Fbk]: Comparing COM object variable with NULL throws an exception
| From: | derick@php.net | Date: | Mon, 06 Sep 2004 06:06:27 +0000 |
| Subject: | #29973 [Opn->Fbk]: Comparing COM object variable with NULL throws an exception | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-65785@lists.php.net to get a copy of this message | ||
ID: 29973
Updated by: derick@php.net
Reported By: tetikr at spytech dot cz
-Status: Open
+Status: Feedback
Bug Type: COM related
Operating System: Win2000
PHP Version: 5.0.1
New Comment:
What is the full error message?
Previous Comments:
------------------------------------------------------------------------
[2004-09-03 19:08:58] tetikr at spytech dot cz
Description:
------------
Comparing COM object variable with NULL throws an exception
Reproduce code:
---------------
$a = new COM(.....);
if (!$a)
{
......
}
else
{
.....
}
Expected result:
----------------
If $a is non null, I expect the ELSE block to be performed.
Actual result:
--------------
PHP throws an exception when trying to evaluate !$a. I think it tries
to access the default COM object's property.
If this is a valid behavior, how should I test for null?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29973&edit=1