Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#26366 closed defect (bug) (duplicate)

wp-includes/capabilities.php notices...

Reported by: carldanley's profile carldanley Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Role/Capability Keywords:
Focuses: Cc:

Description

Every time I fire up my dashboard, I receive notices for the WordPress activity dashboard widget. See: http://d.pr/i/3wiz. Granted, I can turn off notices in PHP but for my dev environment, I like to keep them on so I can see things like this.

get_post_type_object() can return null. There aren't any checks for that null object which is a bad thing. I'm hoping this patch will spark whatever is needed to prevent these notices from happening. See my diff for the solution.

I *think* the way this is able to be replicated is by creating a post that has privileges tied to a plugin but then deactivate the plugin and watch as the activity stream goes kaboom because those priv's aren't there anymore? Haven't full wrapped my head around anything because I haven't had time yet.

Attachments (3)

26366.diff (470 bytes) - added by carldanley 11 years ago.
26366-2.diff (1.0 KB) - added by carldanley 11 years ago.
26366-3.diff (1.0 KB) - added by carldanley 11 years ago.
add spaces to adhere to coding standards

Download all attachments as: .zip

Change History (4)

@carldanley
11 years ago

@carldanley
11 years ago

@carldanley
11 years ago

add spaces to adhere to coding standards

#1 @SergeyBiryukov
11 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version changed from trunk to 3.1

Duplicate of #16956. Related: #13905, #16651.

Note: See TracTickets for help on using tickets.