PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » PEAR » PEAR_PackageFileManager » Bug #5006

Message "Only variables can be passed by reference ... File.php line 110"

Details

Submitted2005-08-05 10:36 UTC
Frommatthew_peters at uk dot ibm dot com
StatusDuplicate
PackagePEAR_PackageFileManager
PHP Version5.1.0
OSWin XP
Roadmaps(Not assigned)

Comments

[2005-08-05 10:36 UTC] matthew_peters at uk dot ibm dot com

Description:
------------
I have a file called MakePackage.php that uses PackageFileManager.

I run it from the command line:
php MakePackage.php
and get the following message:
Fatal error: Only variables can be passed by reference in c:\php\PEAR\PEAR\PackageFileManager\File.php on line 110

If I run the same MakePackage.php from Zend Studio I don't get the error message. I don't know if this is to do with PHP versions (ZS is using PHP 5.0).

Test script:
---------------
If it is any help:

I check line 110 of File.php and it reads
$ext = array_pop(explode('.', $file));

When I change this to
$explode = explode('.',$file) ;
$ext = array_pop($explode);

the problem disappears.

Expected result:
----------------
I expect to see nothing except my package.xml to be created.

Actual result:
--------------
The error message as shown above.