php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18878 method always seems to cause exception
Submitted: 2002-08-13 06:45 UTC Modified: 2002-08-13 16:59 UTC
From: tohlow at novadys dot de Assigned:
Status: Not a bug Package: COM related
PHP Version: 4.2.2 OS: WIN 2000
Private report: No CVE-ID: None
 [2002-08-13 06:45 UTC] tohlow at novadys dot de
Hi,

I have a COM object with a method that only returns hresult. The call is like this:

 $myObj->Method();

Even though it works, I noticed that

 $myObj->Method() or die ("method failed");

will terminate my script, because apparently some sort of exception occurs. I know the information may not be sufficient, but I'll gladly answer additional questions. The problem looks similar enough to an already fixed problem with ID 12718.

Thanks,
Thorsten

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-13 16:59 UTC] phanto@php.net
S_OK (the hresult of a successful function call) equals to 0 and '0 or something()' will cause the evaluation of something() therefor your script dies.

harald
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Aug 11 17:05:44 2022 UTC