wiki.techinc.nl/tests/phpunit/includes/upload
Ori Livneh 0a82600a27 upload: Fix incorrect handling of missing file extension in UploadStash
The problematic code:

  $extensions = explode( ' ', $magic->getExtensionsForType( $mimeType ) );
  if ( count( $extensions ) ) {
    $extension = $extensions[0];
  }

If $mimeType is not known to MediaWiki,
   $magic->getExtensionsForType($mimeType) will return null.
explode( ' ', null ) is [""]. (Thank you so much, PHP!)
This means $extensions is nonempty (it contains the empty string), so
$extension is set to ''.

Change-Id: Icf387a9c93cb7351c2f48c69f413e7ad2224ba6b
2020-05-22 18:26:18 -04:00
..
UploadBaseTest.php tests: Add explicit return type void to setUp() and tearDown() 2019-10-30 14:31:22 -07:00
UploadFromUrlTest.php Tests: Replace ::doDeleteArticle with WikiPage::doDeleteArticleReal 2020-03-25 11:34:17 -07:00
UploadStashTest.php upload: Fix incorrect handling of missing file extension in UploadStash 2020-05-22 18:26:18 -04:00