php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #34481 "Only variables can be passed by reference" new error condition
Submitted: 2005-09-12 16:13 UTC Modified: 2005-09-12 21:28 UTC
From: BastianBalthazarBux at pnpitalia dot it Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 5.0.5 OS: linux
Private report: No CVE-ID: None
 [2005-09-12 16:13 UTC] BastianBalthazarBux at pnpitalia dot it
Description:
------------
This particular condition of error has been introduced in php-5.0.5, and is *not* present in 5.0.4 the following error broke some apps, notably "horde".

Fatal error: Only variables can be passed by reference in pippo.php on line 10

php.ini:allow_call_time_pass_reference = On

See reproduce code, until 5.0.4 it was possible to pass the result of a function.

It's possible to delay this change of behaviour until 5.1 release ?

If not could you point me to a patch that revert this behaviour ?

Many thanks 

Reproduce code:
---------------
<?php
$var="pippo";

function printme(&$var) {
    echo "{$var}\n";
}

printme(serialize($var));
?>


Expected result:
----------------
s:5:"pippo";

Actual result:
--------------
Fatal error: Only variables can be passed by reference in pippo.php on line 10

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-12 16:19 UTC] derick@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

.
 [2005-09-12 16:38 UTC] BastianBalthazarBux at pnpitalia dot it
Still not found the correct bug could someone point to that ? Thanks again.
 [2005-09-12 21:28 UTC] derick@php.net
#34480 (the bugreport before yours)
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun May 22 21:05:44 2022 UTC