Page MenuHomePhabricator

Cannot upload from url source, in php 5.0.5
Closed, ResolvedPublic

Description

Author: anon.hui

Description:
When uploading file from url source ($wgAllowCopyUploads = true), it return error,

Fatal error: Only variables can be passed by reference in /usr/share/mediawiki1.10/includes/SpecialUpload.php on line 124

Where SpecialUpload.php line 124 is,

$this->mOname        = array_pop( explode( '/', $url ) );

It produces the same error, when invoking like the following,

$ php5 -r 'array_pop( explode(".","a") );'
Fatal error: Only variables can be passed by reference in Command line code on line 124

php version in the above test is 5.0.5. In php4, it doesn't have this error.

This is not php bug. See,


Version: 1.10.x
Severity: normal

Details

Reference
bz13022

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:06 PM
bzimport set Reference to bz13022.
bzimport added a subscriber: Unknown Object (MLST).

anon.hui wrote:

I've just tried assigning the array to $temp first,

$this->mOname        = array_pop( $temp = explode( '/', $url ) );

And it work now.