#34481 [Opn->Bgs]: "Only variables can be passed by reference" new error condition

From: Date: Mon, 12 Sep 2005 14:19:06 +0000
Subject: #34481 [Opn->Bgs]: "Only variables can be passed by reference" new error condition
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-84935@lists.php.net to get a copy of this message
 ID:               34481
 Updated by:       derick@php.net
 Reported By:      BastianBalthazarBux at pnpitalia dot it
-Status:           Open
+Status:           Bogus
 Bug Type:         Feature/Change Request
 Operating System: linux
 PHP Version:      5.0.5
 New Comment:

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.

.


Previous Comments:
------------------------------------------------------------------------

[2005-09-12 16:13:56] 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


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=34481&edit=1


Thread (4 messages)

« previous php.bugs (#84935) next »