[wp-trac] [WordPress Trac] #29262: PHP warning on update check when plugins or translations arrays are empty

WordPress Trac noreply at wordpress.org
Tue Aug 19 07:52:57 UTC 2014


#29262: PHP warning on update check when plugins or translations arrays are empty
--------------------------+-----------------------
 Reporter:  yoavf         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  4.0
Component:  General       |    Version:  trunk
 Severity:  normal        |   Keywords:  has-patch
  Focuses:                |
--------------------------+-----------------------
 '''URL visited:''' /wp-admin/update-core.php?force-check=1

 Request sent to api server:
 '''URL''': https://api.wordpress.org/plugins/update-check/1.1/
 '''Request body''':

 {{{
 array (
     'plugins' => '{"plugins":{"hello.php":{"Name":"Hello
 Dolly","PluginURI":"http:\\/\\/wordpress.org\\/plugins\\/hello-
 dolly\\/","Version":"1.6","Description":"This is not just a plugin, it
 symbolizes the hope and enthusiasm of an entire generation summed up in
 two words sung most famously by Louis Armstrong: Hello, Dolly. When
 activated you will randomly see a lyric from <cite>Hello, Dolly<\\/cite>
 in the upper right of your admin screen on every page.","Author":"Matt
 Mullenweg","AuthorURI":"http:\\/\\/ma.tt\\/","TextDomain":"","DomainPath":"","Network":false,"Title":"Hello
 Dolly","AuthorName":"Matt Mullenweg"}},"active":[]}',
     'translations' => '{"akismet":{"de_DE":{"POT-Creation-Date":"","PO-
 Revision-Date":"2014-04-16 09:59:39+0000","Project-Id-
 Version":"Development","X-Generator":"GlotPress\\/0.1"}},"wordpress-
 importer":{"he_IL":{"POT-Creation-Date":"","PO-Revision-Date":"2011-08-05
 09:40:04+0000","Project-Id-Version":"Development
 (trunk)","X-Generator":"GlotPress\\/0.1"}}}',
     'locale' => '["he_IL"]',
     'all' => 'true',
   ),
 }}}

 '''Response body'''
 {{{
 'body' => '{"plugins":[],"translations":[]}',
 }}}

 '''PHP Warning'''

 {{{
 PHP Warning:  Invalid argument supplied for foreach() in /srv/www
 /wordpress-develop/src/wp-includes/update.php on line 312
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29262>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list