[wp-trac] [WordPress Trac] #63028: PHP Warning caused by media.php and formatting.php
WordPress Trac
noreply at wordpress.org
Thu Feb 27 08:06:07 UTC 2025
#63028: PHP Warning caused by media.php and formatting.php
-------------------------------------+------------------------------
Reporter: isrgrajan | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 6.7.2
Severity: normal | Resolution:
Keywords: reporter-feedback close | Focuses:
-------------------------------------+------------------------------
Changes (by isrgrajan):
* keywords: reporter-feedback => reporter-feedback close
Comment:
Replying to [comment:4 dd32]:
Thank you for the clarification. I completely agree—forcing the
`post_parent` into an array is not something **WordPress** should support.
The simulation was only intended to illustrate how unexpected input can
lead to PHP warnings and unstable behaviour, emphasizing that developers
need to ensure they're passing data in the expected format. In a proper
implementation, `WP_Post::post_parent` should always be a scalar, and any
deviation is a developer error rather than a WordPress bug. Your insights
are much appreciated.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63028#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list