Make WordPress Core

Opened 8 years ago

Last modified 7 years ago

#38479 new defect (bug)

Need to check utf8_encode() is available before use.

Reported by: gitlost's profile gitlost Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 4.4
Component: Media Keywords: needs-patch
Focuses: Cc:


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.)

Change History (3)

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

7 years ago

#2 @desrosj
7 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

@gitlost are you interested in making a patch for this?

#3 @gitlost
7 years ago

Hi @desrosj yes, I'll give it a blast.

Note: See TracTickets for help on using tickets.