Make WordPress Core

Opened 18 years ago

Closed 18 years ago

#8299 closed defect (bug) (duplicate)

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

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

Description

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
18 years ago

  • Resolution → duplicate
  • Status new → closed

Dupe of #8303

Note: See TracTickets for help on using tickets.