[wp-trac] [WordPress Trac] #8299: display_element causing "Warning:
Cannot use a scalar value as an array"
WordPress Trac
wp-trac at lists.automattic.com
Thu Nov 20 22:17:16 GMT 2008
#8299: display_element causing "Warning: Cannot use a scalar value as an array"
-------------------------+--------------------------------------------------
Reporter: HyperionJRW | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone:
Component: General | Version: 2.7
Severity: normal | Keywords: wp_list_page walker
-------------------------+--------------------------------------------------
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.
--
Ticket URL: <http://trac.wordpress.org/ticket/8299>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list