For Programmers: Free Programming Magazines  


Home > Archive > PHP Questions and Answers > September 2006 > Re: [Gallery-devel] [PHP-QA] Bug in COM support in PHP 5.2.0 RC5









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

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

2006-09-28, 6:56 pm

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:
>
> 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?...orge&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 ]
>

Wez Furlong

2006-09-28, 6:56 pm

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:
[color=darkred]
> 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
>
> perform boolean operation against an object of type COM, I get an
> error that it cannot be converted to boolean.
> converted to boolean
> equal to (bool)true.
> ----------------------------------------------------------------------
> ---
> share your
> earn cash
> page=join.php&p=sourceforge&CID=DEVDEV
Larry Menard

2006-09-28, 6:56 pm

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:
>
>
>
> -------------------------------------------------------------------------
> 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?...orge&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 ]
>

Wez Furlong

2006-09-28, 6:56 pm

that check is redundant in PHP 5; if the object couldn't be created,
an exception will be thrown.

--Wez.

On Sep 28, 2006, at 5:15 PM, Larry Menard wrote:
[color=darkred]
> 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
>
> 5.2.
> ----------------------------------------------------------------------
> ----------------------------------------------------------------------
> ---
> share your
> earn cash
> page=join.php&p=sourceforge&CID=DEVDEV
Wez Furlong

2006-09-28, 6:56 pm

Tony,

Any idea why this is now an error?
Is something missing from the com extension?
If so, it needs to be fixed because one of the core features of the
variant class is magically representing a variant bool, which can be
interpreted as either true or false.

--Wez.


On Sep 28, 2006, at 5:21 PM, Wez Furlong wrote:

> that check is redundant in PHP 5; if the object couldn't be
> created, an exception will be thrown.
>
> --Wez.
>
> On Sep 28, 2006, at 5:15 PM, Larry Menard wrote:
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com