From: Wez F. <we...@ne...> - 2006-09-28 20:49:33
|
com, variant and dotnet objects are all the same really. The question is, why are you comparing them with bool in the first place? --Wez. On Sep 28, 2006, at 4:40 PM, Larry Menard wrote: > I also found that it's not only COM objects... I have another > occurrence: > > Catchable fatal error: Object of class variant could not be > converted to boolean > > -------------------- > Larry Menard > "Defender of Geese and of All Things Natural" > E-mail and MSN Messenger: lar...@ro... > Web: http://ca.geocities.com/lar...@ro... > > > ----- Original Message ----- > From: "Antony Dovgal" <an...@ze...> > To: "Antony Dovgal" <an...@ze...> > Cc: "Wez Furlong" <we...@om...>; <gallery- > de...@li...>; "Larry Menard" > <lar...@ro...>; <ph...@li...> > Sent: Thursday, September 28, 2006 4:10 PM > Subject: Re: [Gallery-devel] [PHP-QA] Bug in COM support in PHP > 5.2.0 RC5 > > > On 28.09.2006 23:57, Antony Dovgal wrote: > >> On 28.09.2006 23:24, Larry Menard wrote: > >>> Hi folks. > >>> > >>> I believe I've found a bug in PHP 5.2.0 RC5. When I try to > perform boolean operation against an object of type COM, I get an > error that it cannot be converted to boolean. > >>> > >>> Simplest repro script: > >>> > >>> <?php > >>> $dbc = new COM ("WinNT://Domain"); > >>> var_dump(bool($dbc)); > >>> ?> > >>> > >>> Error produced is: > >>> > >>> Catchable fatal error: Object of class com could not be > converted to boolean > >> > >> This is expected behaviour, which was (will be) introduced in 5.2. > > > > Hm, I'm probably wrong. > > Objects cannot be converted to int, but they should be always > equal to (bool)true. > > > > -- > > Wbr, > > Antony Dovgal > > > > > ---------------------------------------------------------------------- > --- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > > opinions on IT & business topics through brief surveys -- and > earn cash > > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV > > __[ g a l l e r y - d e v e l ]_________________________ > > > > [ list info/archive --> http://gallery.sf.net/lists.php ] > > [ gallery info/FAQ/download --> http://gallery.sf.net ] > > |