Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#13929 closed defect (bug) (fixed)

Fatal errors in get_body_class() in latest trunk (15268)

Reported by: uglyrobot Owned by:
Milestone: 3.0 Priority: highest omg bbq
Severity: blocker Version: 3.0
Component: General Keywords: needs-patch
Focuses: Cc:


View any page in a theme that uses get_body_class() (2010 for example) and you get a fatal error:
Catchable fatal error: Object of class stdClass could not be converted to string in wp-includes\post-template.php on line 432

Seems the $page_id var is getting overwritten by the $wp_query class when passed through $post = get_page($page_id);

Confirmed in WP and multisite with no plugins.

Change History (4)

#1 @nacin
11 years ago

  • Priority changed from high to highest omg bbq

Broken in [15265]...

#2 @ryan
11 years ago

(In [15269]) Avoid var name collision. see #13929

#3 @jorbin
11 years ago

  • Cc aaron@… added

I can confirm that Ryan's fix works for me on php 5.2.9 with 2010

#4 @ryan
11 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.