ID:               34480
 Updated by:       [EMAIL PROTECTED]
 Reported By:      alesegala at users dot sourceforge dot net
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: Irrelevant
 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 14:15:30] alesegala at users dot sourceforge dot net

Description:
------------
I found this bug twice.
It always worked before, but with PHP 5.1RC1 and 5.0.5 these two
scripts don't work:
In script I developed (you can see the function that cause error in the
code below).
The error is:

Fatal error: Only variables can be passed by reference in ...

I found this bug in phpBB (last version) too, in the same server, when
I try to post. This is the error:

Fatal error: Only variables can be passed by reference in
C:\[...]\forum\posting.php on line 555

I'm using Windows XP Pro SP2, Apache2, PHP 5.0.5 (but this bug is in
5.1.0RC1 too). PHP is running as CLI

Reproduce code:
---------------
This is a code I wrote:

// Get filename and extension
function get_filename_parts($file)
{
        $extension = end(explode(".", $file));
        $filename = substr($file, 0, -(strlen($extension)+1) );
        return array($filename, $extension);
}

Now it works:

// Get filename and extension
function get_filename_parts($file)
{
        $split = explode(".", $file);
        $extension = end($split);
        $filename = substr($file, 0, -(strlen($extension)+1) );
        return array($filename, $extension);
}



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


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

Reply via email to