Re: [Gallery-devel] [PHP-QA] Bug in COM support in PHP 5.2.0 RC5

From: Date: Thu, 28 Sep 2006 21:15:09 +0000
Subject: Re: [Gallery-devel] [PHP-QA] Bug in COM support in PHP 5.2.0 RC5
References: 1 2 3 4 5  Groups: php.qa 
Request: Send a blank email to php-qa+get-26913@lists.php.net to get a copy of this message
I originally found the problem like this: // Connect to database $dbc = new COM(...); // Check that it was successful if (! $dbc) { ...}; We then reduced it to that one single line just for simplification. -------------------- Larry Menard "Defender of Geese and of All Things Natural" E-mail and MSN Messenger: larry.menard@rogers.com Web: http://ca.geocities.com/larry.menard@rogers.com ----- Original Message ----- From: "Wez Furlong" <wez@netevil.org> To: "Larry Menard" <larry.menard@rogers.com> Cc: <gallery-devel@lists.sourceforge.net>; "Wez Furlong" <wez@omniti.com>; "Antony Dovgal" <antony@zend.com>; <php-qa@lists.php.net> Sent: Thursday, September 28, 2006 4:49 PM Subject: Re: [Gallery-devel] [PHP-QA] Bug in COM support in PHP 5.2.0 RC5 > 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: larry.menard@rogers.com >> Web: http://ca.geocities.com/larry.menard@rogers.com >> >> >> ----- Original Message ----- >> From: "Antony Dovgal" <antony@zend.com> >> To: "Antony Dovgal" <antony@zend.com> >> Cc: "Wez Furlong" <wez@omniti.com>; <gallery- >> devel@lists.sourceforge.net>; "Larry Menard" >> <larry.menard@rogers.com>; <php-qa@lists.php.net> >> 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 ] >> > > > > ------------------------------------------------------------------------- > 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 ] >

« previous php.qa (#26913) next »