[wp-trac] [WordPress Trac] #8148: check return value from
get_core_update() before foreach()
WordPress Trac
wp-trac at lists.automattic.com
Tue Nov 11 00:36:27 GMT 2008
#8148: check return value from get_core_update() before foreach()
---------------------+------------------------------------------------------
Reporter: lybica | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.7
Component: General | Version:
Severity: normal | Keywords:
---------------------+------------------------------------------------------
'''Warning''': Invalid argument supplied for foreach() in {...}'''/wp-
admin/update-core.php''' on line '''113'''[[BR]]
[[BR]]
foreach() does not like the "false" returned from get_core_update() (in
wp-admin/includes/update.php).[[BR]]
functions in update-core.php should perform return value checks
like:[[BR]]
{{{
...
if( is_array($updates) ) {
foreach( $updates as $update ) {
...
}}}
(dismissed_updates(), core_upgrade_preamble() in wp-admin/update-
core.php)[[BR]]
--
Ticket URL: <http://trac.wordpress.org/ticket/8148>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list