#40480 [NEW]: COM: "Cannot pass parameter by reference" error since 5.2.1
| From: | tetikr at spytech dot cz | Date: | Wed, 14 Feb 2007 11:48:46 +0000 |
| Subject: | #40480 [NEW]: COM: "Cannot pass parameter by reference" error since 5.2.1 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-108857@lists.php.net to get a copy of this message | ||
From: tetikr at spytech dot cz
Operating system: Windows XP, IIS 5.1
PHP version: 5.2.1
PHP Bug Type: COM related
Bug description: COM: "Cannot pass parameter by reference" error since 5.2.1
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 bug report at http://bugs.php.net/?id=40480&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40480&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40480&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40480&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40480&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=40480&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40480&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40480&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40480&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40480&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40480&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=40480&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=40480&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40480&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40480&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40480&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40480&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40480&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40480&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40480&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40480&r=mysqlcfg