[wp-trac] [WordPress Trac] #38479: Need to check utf8_encode() is available before use.

WordPress Trac noreply at wordpress.org
Tue Oct 25 04:38:16 UTC 2016


#38479: Need to check utf8_encode() is available before use.
--------------------------+-----------------------------
 Reporter:  gitlost       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  4.4
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 The DOM/XML extension isn't necessarily installed on some distros so use
 of `utf8_encode()` should be checked for availability first. It's not
 checked in `wp_read_image_metadata()` in "wp-admin/includes/image.php"
 (where I encountered its lack on a Ubuntu 16.04 PHP 7 server), introduced
 in [36429] and [36430], nor in `wxr_cdata()` in "wp-
 admin/includes/export.php", introduced in the distant past.

 (Also it does ISO-8859-1 not Windows-1252 so more than likely not that
 good in the image situation anyway.)

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


More information about the wp-trac mailing list