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

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
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