From: lee at dark-circuit dot com Operating system: Windows XP SP2 PHP version: 5CVS-2007-02-10 (snap) PHP Bug Type: COM related Bug description: Fatal error when setting the value of COM object's property array
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 bug report at http://bugs.php.net/?id=40424&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40424&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40424&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40424&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40424&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40424&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40424&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40424&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40424&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40424&r=support Expected behavior: http://bugs.php.net/fix.php?id=40424&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40424&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40424&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40424&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40424&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40424&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40424&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40424&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40424&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40424&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40424&r=mysqlcfg