[wp-trac] [WordPress Trac] #48653: PHP Notices when requesting a post with an unregistered status
WordPress Trac
noreply at wordpress.org
Mon Nov 18 07:57:02 UTC 2019
#48653: PHP Notices when requesting a post with an unregistered status
-------------------------------+------------------------------
Reporter: roytanck | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-------------------------------+------------------------------
Comment (by roytanck):
Replying to [comment:3 Rarst]:
> I am not sure I agree with "doing_it_wrong" handling here, since there
is nothing wrong with attempting the check. The problem is with invalid
state of the system, not with developer making incorrect call. Sounds like
a straight error case to me?
>
> No opinion on implementation/behavior.
Thank you. Using doing_it_wrong here was simply "ego-less programming",
since the rest of the function uses this in similar situations. The point
is to catch the invalid state and provide meaningful feedback. Chances are
the developer doing the check is unaware of previously registered post
statuses still lingering in the database.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48653#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list