ID:               31606
 Updated by:       [EMAIL PROTECTED]
 Reported By:      gutzas at moongate dot ro
-Status:           Open
+Status:           Bogus
 Bug Type:         Unknown/Other Function
 Operating System: Fedora Linux
 PHP Version:      4.3.10
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Remove the & from the call!


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

[2005-01-19 11:03:01] gutzas at moongate dot ro

Description:
------------
Passing by reference when the function is called as variable generates
a warning message, even if the function does accept its parameters by
reference.

The actual behaviour is however correct, even though the warning says
that the argument has been passed by value.

This is a major problem for intensively used sites where this
functionality is needed and warning messages are logged because the
logs grow to unmanageable sizes really fast.


Reproduce code:
---------------
<?

  function foo(&$param)
  {
    $param++;
  }

  $function_name='foo';
  $myParam=1;
  $function_name(&$myParam);
  echo("\n---> $myParam <---\n");

?>


Expected result:
----------------
---> 2 <---


Actual result:
--------------
<br />
<b>Warning</b>:  Call-time pass-by-reference has been deprecated -
argument passed by value;  If you would like to pass it by reference,
modify the declaration of [runtime function name]().  If you would like
to enable call-time pass-by-reference, you can set
allow_call_time_pass_reference to true in your INI file.  However,
future versions may not support this any longer.  in
<b>/var/www/html/mgv/dev/helpdesk_root/helpdesk/test_reference.php</b>
on line <b>10</b><br />

---> 2 <---



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


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

Reply via email to