From: Brion Vibber Date: Tue, 26 Feb 2008 00:00:43 +0000 (+0000) Subject: * (bug 13022) Fix upload from URL on PHP 5.0.x X-Git-Tag: 1.31.0-rc.0~49344 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=575feafea7eaaaf5f3eb69325ea6ae34cc46e735;p=lhc%2Fweb%2Fwiklou.git * (bug 13022) Fix upload from URL on PHP 5.0.x PHP 5.0.x whines about pass-by-ref, apparently :P --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 58ab9e037c..f47044645e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/SpecialUpload.php b/includes/SpecialUpload.php index c2ad0bc545..0583c1df00 100644 --- a/includes/SpecialUpload.php +++ b/includes/SpecialUpload.php @@ -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;