Last modified: 2010-05-15 15:50:40 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T15022, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 13022 - Cannot upload from url source, in php 5.0.5
Cannot upload from url source, in php 5.0.5
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
1.10.x
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy, patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-15 09:00 UTC by Anon Sricharoenchai
Modified: 2010-05-15 15:50 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Anon Sricharoenchai 2008-02-15 09:00:24 UTC
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,
* http://bugs.php.net/bug.php?id=33643
* http://bugs.php.net/bug.php?id=33257
* http://bugs.php.net/bug.php?id=33516
Comment 1 Anon Sricharoenchai 2008-02-15 09:08:36 UTC
I've just tried assigning the array to $temp first,

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

And it work now.
Comment 2 Brion Vibber 2008-02-26 00:00:55 UTC
r31284

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links