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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 18:01:29 2024 UTC