[wp-trac] [WordPress Trac] #31995: Errors while "View details" for plugin. Error source: class-wp-plugin-install-list-table.php line 36

WordPress Trac noreply at wordpress.org
Thu Apr 16 21:29:45 UTC 2015


#31995: Errors while "View details" for plugin. Error source: class-wp-plugin-
install-list-table.php line 36
--------------------------+-----------------------------
 Reporter:  DarkoG        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.1.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Hello,

 I noticed when i clicked on some plugin's "View details". Please check the
 screenshot.


 {{{
 File: /wp-admin/includes/class-wp-plugin-install-list-table.php line 36
 }}}


 I just added additional check to sensure the $slug is not empty value

 {{{
 if(isset($plugin->slug) && !empty($plugin->slug)){
         $slugs[] = $plugin->slug;
 }
 }}}

 Here is the full function:

 {{{
 protected function get_installed_plugin_slugs() {
         $slugs = array();

         $plugin_info = get_site_transient( 'update_plugins' );
         if ( isset( $plugin_info->no_update ) ) {
                 foreach ( $plugin_info->no_update as $plugin ) {
                         if(isset($plugin->slug) && !empty($plugin->slug)){
                                 $slugs[] = $plugin->slug;
                         }
                 }
         }

         if ( isset( $plugin_info->response ) ) {
                 foreach ( $plugin_info->response as $plugin ) {
                         $slugs[] = $plugin->slug;
                 }
         }

         return $slugs;
 }
 }}}

 Here is the image

 [[Image(http://factory.darkog.com/upload/error.jpg)]]

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


More information about the wp-trac mailing list