[wp-trac] [WordPress Trac] #40292: Use echo file_get_contents() instead of require_once() to pull in SVG file contents in Twenty Seventeen
WordPress Trac
noreply at wordpress.org
Wed Mar 29 06:22:44 UTC 2017
#40292: Use echo file_get_contents() instead of require_once() to pull in SVG file
contents in Twenty Seventeen
---------------------------+------------------------------
Reporter: kellenmace | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version: 4.7.3
Severity: normal | Resolution:
Keywords: | Focuses:
---------------------------+------------------------------
Comment (by sami.keijonen):
Thanks @kellenmace for report. It was my suggestion originally to use
`require_once`. I did know about the possible error '''if''' the SVG file
starts with `<?xml version="1.0" encoding="UTF-8"?>`.
In this case it doesn't.
With that said I don't have objection for using `readfile()` if it's safe,
fast, and reliable method.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40292#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list