php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73126 Cannot pass parameter 1 by reference
Submitted: 2016-09-20 12:10 UTC Modified: 2016-09-20 17:02 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: bugzilla77 at gmail dot com Assigned:
Status: Closed Package: COM related
PHP Version: 7.1.0RC2 OS: Win 10 Pro 64-bit
Private report: No CVE-ID: None
 [2016-09-20 12:10 UTC] bugzilla77 at gmail dot com
Description:
------------
Script1 is the same like Stript2
...but Stript2 prints:

Fatal error: Uncaught Error: Cannot pass parameter 1 by reference in C:\htdocs\test.pl\2.php:3 Stack trace: #0 {main} thrown in C:\htdocs\test.pl\2.php on line 3

Test script:
---------------
<?php // stript1
 $d=(new COM('com.sun.star.ServiceManager',null,CP_UTF8))->CreateInstance('com.sun.star.frame.Desktop')->LoadComponentFromURL('private:factory/swriter','_blank',0,[]);
?>

<?php // stript2
 $o=new COM('com.sun.star.ServiceManager',null,CP_UTF8);
 $d=$o->CreateInstance('com.sun.star.frame.Desktop')->LoadComponentFromURL('private:factory/swriter','_blank',0,[]);
?>

Expected result:
----------------
No Fatal error

Actual result:
--------------
Fatal error: Uncaught Error: Cannot pass parameter 1 by reference in C:\htdocs\test.pl\2.php:3 Stack trace: #0 {main} thrown in C:\htdocs\test.pl\2.php on line 3

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-09-20 12:13 UTC] bugzilla77 at gmail dot com
This problem does not occur in PHP 7.1beta3.
Only 7.1RC2!
...and probably 7.1RC1.
 [2016-09-20 17:02 UTC] cmb@php.net
-Package: *General Issues +Package: COM related
 [2016-09-22 09:52 UTC] ab@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=579c8669c8b8b5646c576aea5b6b5c894ce485ff
Log: Fixed bug #73126 Cannot pass parameter 1 by reference
 [2016-09-22 09:52 UTC] ab@php.net
-Status: Open +Status: Closed
 [2016-10-17 10:08 UTC] bwoebi@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=579c8669c8b8b5646c576aea5b6b5c894ce485ff
Log: Fixed bug #73126 Cannot pass parameter 1 by reference
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Oct 14 04:01:27 2024 UTC