#40480 [Com]: COM: "Cannot pass parameter by reference" error since 5.2.1

From: Date: Thu, 01 Mar 2007 17:28:58 +0000
Subject: #40480 [Com]: COM: "Cannot pass parameter by reference" error since 5.2.1
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-109759@lists.php.net to get a copy of this message
ID: 40480 Comment by: wharmby at uk dot ibm dot com Reported By: tetikr at spytech dot cz Status: Open Bug Type: COM related Operating System: Windows XP, IIS 5.1 PHP Version: 5.2.1 New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [2007-02-14 12:39:58] 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-02-14 12:10:19] 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 11:48:46] 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40480&edit=1

« previous php.bugs (#109759) next »