php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34564 reference (in/out) parameters don't work
Submitted: 2005-09-20 14:31 UTC Modified: 2007-02-02 15:52 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: milman at gmx dot de Assigned: wharmby (profile)
Status: Closed Package: COM related
PHP Version: 5CVS-2005-09-20 (snap) OS: windows xp
Private report: No CVE-ID: None
 [2005-09-20 14:31 UTC] milman at gmx dot de
Description:
------------
reference paramater in com-function-calls don't work

Reproduce code:
---------------
<?php
class IEEventSinker {
  function BeforeNavigate2(&$dom, $url, $flags, $TargetFrameName, $PostData, $Headers, & $cancel) {
    // THAT IS THE PROBLEM. IT DOSN'T WORK
    $cancel = true ;
  }
}

$ie   = new COM("InternetExplorer.Application");
$sink =new IEEventSinker();
com_event_sink($ie, $sink, "DWebBrowserEvents2");

$ie->Visible = true;
$ie->Navigate("http://www.php.net");

while(!$sink->terminated) {
  com_message_pump(4000);
}
?> 

Expected result:
----------------
the InternetExplorer shows a blank page

Actual result:
--------------
he show the page

the same in VB shows the expected.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-20 15:26 UTC] sniper@php.net
Assigned to the maintainer of COM.

 [2006-06-23 21:14 UTC] massimiliano at it dot ibm dot com
Hello,
on today 23.06.2006:

I can reproduce the same problem also on Win2K...
using the sample code here.

I tried with php 5.1.4 and (php 6 development) with the same behavior.

On php 4 abend give me a memory read fault popup reporting instruction at address 0x1003b481 had referenced memory at 0x00000000.

IE version 6.0.2800...

Regards, Massimiliano
 [2007-01-23 10:01 UTC] wharmby at uk dot ibm dot com
Hi Wez
  I will take a look at this one next. I am able to recreate as described in defect.

Andy
 [2007-01-25 17:13 UTC] wharmby at uk dot ibm dot com
2 probelms here:

(1) The first is a problem with the testcase. Variants should be modified by using the variant_set() fucntion, i.e
  
         variant_set($cancel, true)
    not 
         cancel = true;

(2) With (1) fixed navigation is still not cancelled because of a bug in the COM code. I have posted a patch for this problem to internals list for review by Wez, et al.
 [2007-02-02 08:47 UTC] wharmby@php.net
Issue 2 now fixed in HEAD. Will send patch to Ilia for approval for drop into 5.2
 [2007-02-02 10:32 UTC] wharmby at uk dot ibm dot com
PHP 5.2 patch sent to Ilia for approval.
 [2007-02-02 15:52 UTC] wharmby@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Fix now in PHP_5_2 and HEAD
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 08 21:01:27 2024 UTC