For Programmers: Free Programming Magazines  


Home > Archive > PHP Questions and Answers > September 2006 > Re: [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: [PHP-QA] Bug in COM support in PHP 5.2.0 RC5
Antony Dovgal

2006-09-28, 6:56 pm

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.

--
Wbr,
Antony Dovgal
Antony Dovgal

2006-09-28, 6:56 pm

On 28.09.2006 23:57, Antony Dovgal wrote:
> On 28.09.2006 23:24, Larry Menard wrote:
>
> 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
Sponsored Links







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

Copyright 2008 codecomments.com