From:             spymail at 21cn dot com
Operating system: Windows 2000
PHP version:      5.0.0RC1
PHP Bug Type:     COM related
Bug description:  Fatal error when setting the value of COM object's Attribute 
property array

Description:
------------


The COM runs well in ASP:

<%asp

'The Attribute property specifies and retrieves name-value pairs.
'
'Syntax:
'
'Header.Attribute(bstrName) = String
'String = Header.Attribute(bstrName)
'
'Parameters: bstrName [in] ,String containing the attribute name. 
'
'Attribute names are case-sensitive, and both the name and value must be
specified in a valid 'XML format. If you duplicate an existing attribute,
the earlier attribute is updated.

Dim rid
rid = "0"
Set headobj = Server.CreateObject("Wmrmobjs.WMRMHeader")
headObj.Attribute("RID") = rid 

%>


But when I convert it to PHP,there's a fatal error.



Reproduce code:
---------------
<?php
$rid=0;
$headObj = new COM("Wmrmobjs.WMRMHeader");
$headObj->Attribute["RID"] = $rid;
?>

Expected result:
----------------
The Attribute should be set.

Actual result:
--------------
There's a Error:

Fatal error: Uncaught exception 'com_exception' with message 'Error
Invalid
number of arguments' in D:\server\abc.php:3 Stack trace: #0 {main} thrown
in D:\server\abc.php on line 3

-- 
Edit bug report at http://bugs.php.net/?id=28161&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28161&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28161&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28161&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28161&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28161&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28161&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28161&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28161&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28161&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28161&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28161&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28161&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28161&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28161&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28161&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28161&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28161&r=float

Reply via email to