[wp-trac] [WordPress Trac] #64347: Fatal error when `wxr_cdata()` is called with non-string value
WordPress Trac
noreply at wordpress.org
Thu Dec 4 11:55:23 UTC 2025
#64347: Fatal error when `wxr_cdata()` is called with non-string value
--------------------------+---------------------
Reporter: desrosj | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.9.1
Component: Export | Version: 6.9
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+---------------------
Comment (by hbhalodia):
Hi @swissspidy @desrosj
Since `wp_is_valid_utf8` function is always expecting the incoming data to
be string, we need o make sure what we send is always a string. Hence I
have created a PR https://github.com/WordPress/wordpress-
develop/pull/10595, which adds the soft type-safe, Since we do not know
what can be input to `wxr_cdata` function, hence strict type check won't
be feasible at the moment (let me know if needs to be stricter check), but
then we need to make sure where this function is called, the param should
passed as string, else it can throw the fatal on this function.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64347#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list