Make WordPress Core

Opened 7 years ago

Closed 20 months ago

#39694 closed defect (bug) (worksforme)

wp_check_filetype() returns false for html files

Reported by: onnimonni's profile onnimonni Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7.1
Component: Media Keywords:
Focuses: Cc:

Description

Is this intentional behaviour?

Running:

<?php
var_dump( wp_check_filetype( 'example.html' ) );

outputs:

array(2) {
  'ext' =>
  bool(false)
  'type' =>
  bool(false)
}

WordPress and PHP versions:

$ wp core version
4.7.1
$ php --version
PHP 7.0.15-1~dotdeb+8.1 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.15-1~dotdeb+8.1, Copyright (c) 1999-2017, by Zend Technologies
    with Xdebug v2.5.0, Copyright (c) 2002-2016, by Derick Rethans

Change History (4)

#1 @SergeyBiryukov
7 years ago

  • Component changed from General to Media

#2 @joemcgill
7 years ago

Hi @onnimonni. This is probably related to #39550.

This ticket was mentioned in Slack in #core-media by joedolson. View the logs.


20 months ago

#4 @antpb
20 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Thanks to @joedolson for testing that this is no longer valid.

From Joe:
Yes, this is fixed. Now returns correct text/html info

Note: See TracTickets for help on using tickets.