|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-09-28 19:55 UTC] larry dot menard at rogers dot com
Description:
------------
First of all, I'm usng RC5, not RC4 (RC5 is not in the list above).
Can't cast an object of type COM to boolean.
Reproduce code:
---------------
$dbc = new COM('WinNT://Domain'); var_dump((bool)$dbc);
Expected result:
----------------
bool(true)
Actual result:
--------------
Catchable fatal error: Object of class com could not be converted to boolean
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 23:00:02 2025 UTC |
I think this one liner will do the job, but haven't been able to verify it: Index: com_handlers.c =================================================================== RCS file: /repository/php-src/ext/com_dotnet/com_handlers.c,v retrieving revision 1.37 diff -u -p -r1.37 com_handlers.c --- com_handlers.c 29 Apr 2006 18:45:29 -0000 1.37 +++ com_handlers.c 6 Oct 2006 12:03:31 -0000 @@ -539,7 +539,7 @@ static int com_object_cast(zval *readobj return SUCCESS; } - return FAILURE; + return zend_std_cast_object_tostring(readobj, writeobj, type TSRMLS_CC); } static int com_object_count(zval *object, long *count TSRMLS_DC) cvs diff: Diffing tests