Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#8299 closed defect (bug) (duplicate)

display_element causing "Warning: Cannot use a scalar value as an array"

Reported by: hyperionjrw's profile HyperionJRW Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.7
Component: General Keywords: wp_list_page walker
Focuses: Cc:


When I view a page in 2.7-beta3-9817 the wp_list_pages throws up a warning in my test environment with both php 4 and 5.

Warning: Cannot use a scalar value as an array in T:\hosts\wordpress\wordpress.trunk\wp-includes\classes.php on line 827

$args[0] is set to page_id when you view a page and $args[1] is the place you're looking for at that point. Problem starts at line 623 post-template. $current_page is only set when on a page and PHP seems not to mind adding an named array to an array when the value is null or 0. Could set the value when not in a page to -1 so people see the problem sooner.

Change History (1)

#1 @mrmist
16 years ago

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

Dupe of #8303

Note: See TracTickets for help on using tickets.