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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
15 + 20 = ?
Subscribe to this entry?

 
 [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: Thu Sep 19 08:01:26 2019 UTC