* (bug 13022) Fix upload from URL on PHP 5.0.x

PHP 5.0.x whines about pass-by-ref, apparently :P
This commit is contained in:
Brion Vibber 2008-02-26 00:00:43 +00:00
parent e66e9b9aef
commit 575feafea7
2 changed files with 3 additions and 1 deletions

View file

@ -43,6 +43,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
* (bug 13149) Correctly format 'fileexists' message on Upload page.
* Make filepageexists accurate.
* (bug 12988) $wgMinimalPasswordLength no longer breaks create user by email
* (bug 13022) Fix upload from URL on PHP 5.0.x
=== API changes in 1.13 ===

View file

@ -141,7 +141,8 @@ class UploadForm {
$this->mTempPath = $local_file;
$this->mFileSize = 0; # Will be set by curlCopy
$this->mCurlError = $this->curlCopy( $url, $local_file );
$this->mSrcName = array_pop( explode( '/', $url ) );
$pathParts = explode( '/', $url );
$this->mSrcName = array_pop( $pathParts );
$this->mSessionKey = false;
$this->mStashed = false;