[wp-trac] [WordPress Trac] #36170: Small refactor in the validate_file method + unit tests

WordPress Trac noreply at wordpress.org
Tue Mar 8 13:48:03 UTC 2016


#36170: Small refactor in the validate_file method + unit tests
-------------------------+-----------------------------
 Reporter:  borgesbruno  |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  General      |    Version:
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 The {{{ validate_file( $file, $allowed_files = '' ) }}} method has as
 third param an array of allowed files, but the default value is a string,
 I created this patch using as default value an empty array instead of a
 empty string.

 Beyond that, I wrote some unit tests for this change and to improve de
 code coverage.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36170>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list