|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45855 COM-Problem with GET/SET, using same method name (but with different arg count)
Submitted: 2008-08-18 16:57 UTC Modified: -
Avg. Score:4.2 ± 1.0
Reproduced:5 of 5 (100.0%)
Same Version:2 (40.0%)
Same OS:2 (40.0%)
From: marcus dot kroschinsky at siemens dot com Assigned:
Status: Open Package: COM related
PHP Version: 5.2.6 OS: WinXP Prof. SP2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-08-18 16:57 UTC] marcus dot kroschinsky at siemens dot com
The COM Application 'myApp' (some properitary inhouse product) throws 'com_exception' if a PHP5 script tries to execute a SET method of given object. Other applications written in C/C++, Python and Excel VBS work fine. 

IDL of myApp:
  [id(0x00000038), propget]  VARIANT DocumentParameterValue(BSTR parameterName);
  [id(0x00000038), propput]  void    DocumentParameterValue(BSTR parameterName, VARIANT rhs);

Reproduce code:
  $obj = new COM("myApp.Document");
  echo $obj->DocumentParameterValue('project');                 // get (ok !)
       $obj->DocumentParameterValue('project', strval('ZONK')); // set (fails !)

Expected result:
Output value of parameter 'project' and set it to string 'ZONK'.

Actual result:
First 2 lines execute ok, but the third line fails with following error:

Fatal error: Uncaught exception 'com_exception' with message 'Error [0x8002000e] Invalid number of parameters.'


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 25 16:01:31 2024 UTC