php.net |  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: -
Votes:5
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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: marcus dot kroschinsky at siemens dot com
New email:
PHP Version: OS:

 

 [2008-08-18 16:57 UTC] marcus dot kroschinsky at siemens dot com
Description:
------------
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:
---------------
<?php
  $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.'

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Aug 25 23:01:28 2019 UTC