php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40480 COM: "Cannot pass parameter by reference" error since 5.2.1
Submitted: 2007-02-14 11:48 UTC Modified: 2007-03-20 16:11 UTC
Votes:2
Avg. Score:3.5 ± 1.5
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: tetikr at spytech dot cz Assigned:
Status: Closed Package: COM related
PHP Version: 5.2.1 OS: Windows XP, IIS 5.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tetikr at spytech dot cz
New email:
PHP Version: OS:

 

 [2007-02-14 11:48 UTC] tetikr at spytech dot cz
Description:
------------
I'm executing this line of code:

$o is a custom COM object
$s = $o->Fields['ICON']->Images[0]->GetResizedUrl(55,55,0);


It works fine in PHP 5.2.0. After installing 5.2.1 it tells me "Cannot pass parameter 1 by reference". Note that no used COM methods/properties use byref parameters.

---------------
I can make it work after any of these work-arounds:

1) $x = o->Fields['ICON']->Images[0];
   $s = $x->GetResizedUrl(55,55,0);

2) $n = 0;
   $s = $o->Fields['ICON']->Images[$n]->GetResizedUrl(55,55,0);

3) $n=55; $n2=0;
   $s = $o->Fields['ICON']->Images[0]->GetResizedUrl($n,$n,$n2);



Reproduce code:
---------------
A custom COM object is involved -> reproduce code is useless


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-14 12:10 UTC] tony2001@php.net
>A custom COM object is involved -> reproduce code is useless
Well, I doubt we can fix something that we can't reproduce.
Are you sure 5.2.0 works fine for you?
What if you take php_com.dll (or whatever it's name) from 5.2.0 and put it instead of the one from 5.2.1?
 [2007-02-14 12:39 UTC] tetikr at spytech dot cz
5.2.0 works fine, I'm sure. There is no php_com.dll or similiar in the ext folder. COM is built-in I think.
 [2007-03-01 17:28 UTC] wharmby at uk dot ibm dot com
Hi Tony,
    I fixed a very similar problem to this in 5.2 and HEAD under defect 34564 on 2nd Feb 2007. See http://bugs.php.net/bug.php?id=34564. 

Regards
  Andy
 [2007-03-01 17:33 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip


 [2007-03-09 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2007-03-20 16:11 UTC] tetikr at spytech dot cz
The PHP 5.2.2 downloaded on 2006-03-20 works well. Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 16:01:29 2024 UTC