WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#11815 closed defect (bug) (fixed)

_future_post_hook should not call _deprecated_argument()

Reported by: nacin Owned by: westi
Milestone: 3.0 Priority: normal
Severity: normal Version:
Component: Plugins Keywords: has-patch
Focuses: Cc:

Description

wp_transition_post_status() passes $post->ID to all "${new_status}_$post->post_type" actions, which _future_post_hook chokes on.

Because the _deprecated_argument() error that is triggered blocks headers from being sent, this really screws up the ability to schedule a future post.

This argument was never used by _future_post_hook, but we should just leave it in anyway and mark it with a comment.

Attachments (1)

11815.diff (938 bytes) - added by nacin 4 years ago.

Download all attachments as: .zip

Change History (3)

nacin4 years ago

comment:1 nacin4 years ago

  • Keywords has-patch added
  • Severity changed from blocker to normal

comment:2 westi4 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [12679]) _future_post_hook should not call _deprecated_argument() as it will always get that argument from the action it is hooked to. Fixes #11815 props nacin.

Note: See TracTickets for help on using tickets.