From: Operating system: WinXP PHP version: 5.3.3 Package: COM related Bug Type: Bug Bug description:com_exception when read array from object->property
Description: ------------ I have small test ActiveX DLL writen in VB6. It is code of DLL: Option Explicit Private str_Text() As String Public Property Get Text(index As Integer) As String ReDim str_Text(3) str_Text(0) = "Test zero string" str_Text(1) = "Test first string" str_Text(2) = "Test second string" If ((index < 0) Or (index >= 3)) Then Text = "" Else Text = str_Text(index) End If End Property Public Property Get Count() As Long Count = 3 End Property When I trying read array from Text property PHP page generate error, but in VB6 it's working correct. Test script: --------------- <?php $obj = new COM('TestCOM.Class1') or die('COM init failed.'); $j = $obj->Count; print $j."<br>"; for ($i=0; $i<$j; $i++) { $str = $obj->Text[$i]; print $str."<br>" ; } ?> Expected result: ---------------- 3 Test zero string Test first string Test second string Actual result: -------------- 3 Fatal error: Uncaught exception 'com_exception' with message 'Error [0x8002000f] ÐаÑамеÑÑ ÑвлÑеÑÑÑ Ð¾Ð±ÑзаÑелÑнÑм. ' in C:\Inetpub\_web_script_\SKU_Buffer\docsgenerator\xls.php:8 Stack trace: #0 C:\Inetpub\_web_script_\SKU_Buffer\docsgenerator\xls.php(8): unknown() #1 {main} thrown in C:\Inetpub\_web_script_\SKU_Buffer\docsgenerator\xls.php on line 8 -- Edit bug report at http://bugs.php.net/bug.php?id=52589&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52589&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52589&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52589&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52589&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52589&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52589&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52589&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52589&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52589&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52589&r=support Expected behavior: http://bugs.php.net/fix.php?id=52589&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52589&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52589&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52589&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52589&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52589&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52589&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52589&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52589&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52589&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52589&r=mysqlcfg