Make WordPress Core

Opened 20 years ago

Closed 20 years ago

Last modified 3 years ago

#3096 closed defect (bug) (fixed)

Page caps using incorrect author id

Reported by: activeingredient Owned by:
Priority: normal Milestone:
Component: Administration Version: 2.1
Severity: normal Keywords: Page, Caps
Cc: Focuses:

Description

When determining caps 'edit_page' & 'delete_page' in wp-includes/capabilities.php (introduced in Changeset 3513) the incorrect author id is determined.

Currently -

326: $page = get_page($args[0]);
327: $page_author_data = get_userdata($post->post_author);
...
380: $page = get_page($args[0]);
381: $page_author_data = get_userdata($post->post_author);

Should be -

326: $page = get_page($args[0]);
327: $page_author_data = get_userdata($page->post_author);
...
380: $page = get_page($args[0]);
381: $page_author_data = get_userdata($page->post_author);

Attachments (1)

capabilities.php.diff​ (1003 bytes ) - added by activeingredient 20 years ago.

Download all attachments as: .zip

Change History (2)

#1 @ryan
20 years ago

  • Resolution → fixed
  • Status new → closed

(In [4158]) Page cap fixes from activeingredient. fixes #3096

Note: See TracTickets for help on using tickets.