#45032 [Opn->Fbk]: Argument passed as reference to fopen() freezes execution
| From: | felipe@php.net | Date: | Sun, 18 May 2008 11:50:47 +0000 |
| Subject: | #45032 [Opn->Fbk]: Argument passed as reference to fopen() freezes execution | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-125093@lists.php.net to get a copy of this message | ||
ID: 45032
Updated by: felipe@php.net
Reported By: partner55470745 at aravensoft dot com
-Status: Open
+Status: Feedback
Bug Type: Unknown/Other Function
Operating System: Debian Linux 4.0
PHP Version: 5.2.6
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
I can't reproduce.
Previous Comments:
------------------------------------------------------------------------
[2008-05-18 11:16:20] partner55470745 at aravensoft dot com
Description:
------------
If an input function argument is passed as a reference (as opposed to
as a value) and it is used as an argument to fopen(), parsing and/or
execution of the script freezes without ANY warning or error whatsoever.
Reproduce code:
---------------
// This does NOT work (although it shoud)
function log_an_event (&$logfile, &$event)
{
$f=fopen($logfile, 'a');
// ...
}
// This is a workaround for the above (first arg not passed as
reference)
function log_an_event ($logfile, &$event)
{
$f=fopen($logfile, 'a');
// ...
}
Expected result:
----------------
Non-freezing execution.
Actual result:
--------------
Execution of the script freezes/exits without ANY warning or error
whatsoever.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45032&edit=1