WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#8148 closed defect (bug) (fixed)

check return value from get_core_update() before foreach()

Reported by: lybica Owned by:
Milestone: 2.7 Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

Warning: Invalid argument supplied for foreach() in {...}/wp-admin/update-core.php on line 113

foreach() does not like the "false" returned from get_core_update() (in wp-admin/includes/update.php).
functions in update-core.php should perform return value checks like:

  ...
  if( is_array($updates) ) {
  foreach( $updates as $update ) {
  ...

(dismissed_updates(), core_upgrade_preamble() in wp-admin/update-core.php)

Change History (1)

comment:1 @ryan7 years ago

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

(In [9698]) Cast to array. fixes #8148

Note: See TracTickets for help on using tickets.