ID: 40424 Updated by: [EMAIL PROTECTED] Reported By: lee at dark-circuit dot com Status: Open Bug Type: COM related Operating System: Windows XP SP2 PHP Version: 5CVS-2007-02-10 (snap) -Assigned To: +Assigned To: wharmby New Comment:
I will take a look at this one next. Previous Comments: ------------------------------------------------------------------------ [2007-02-10 04:31:38] lee at dark-circuit dot com sorry, messed up expected result slightly. Should be: Expected result: ---------------- CAKE PIE PIE ------------------------------------------------------------------------ [2007-02-10 00:36:05] lee at dark-circuit dot com Description: ------------ Fatal error when setting the value of COM object's property array Basically I'm having the same problem as Bug #28161 [This bug is marked closed, fixed] http://bugs.php.net/bug.php?id=28161&edit=1 COM Array Assignment isn't working. In the old closed bug, wez posted a fix that went into RC2 of PHP 5.0, but I'm guessing that the fix didn't make it into release 5.0 or any current versions. Have tested code on most currentish snaps of PHP 5.0 - 5.2.2 for sanity. Reproduce code: --------------- $itemindex = 2914; $oInfo = new COM("PAW.LineItem") or die("WHAT THE?"); $oInfo->GetForIndex($itemindex); // CustomField is: // string CustomField(ByVal Index As Integer) echo $oInfo->CustomField[1]; echo "\n"; $oInfo->CustomField[1] = "PIE"; echo "\n"; echo $oInfo->CustomField[1]; Expected result: ---------------- CAKE PIE CAKE Actual result: -------------- CAKE PHP Fatal error: Uncaught exception 'com_exception' with message 'Error [0x8002000f] Parameter not optional. ' in C:\New Folder\prime-sync-itemdb.php:197 Stack trace: #0 C:\New Folder (3)\prime-sync-itemdb.php(197): unknown() #1 {main} thrown in C:\New Folder\prime-sync-itemdb.php on line 197 Note: for sanity I confirmed assignment works to same property by writing same program in VB.NET. Works ok. oInfo.CustomField(1) = "PIE" in VB.NET ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40424&edit=1