Make WordPress Core

Changeset 18586


Ignore:
Timestamp:
08/23/2011 03:56:14 PM (15 years ago)
Author:
nacin
Message:

Check if property exists on plugins_api() returned object in install_plugin_information(). props hakre, fixes #18181.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/plugin-install.php

    r18481 r18586  
    255255        foreach ( (array)$api->sections as $section_name => $content )
    256256                $api->sections[$section_name] = wp_kses($content, $plugins_allowedtags);
    257         foreach ( array('version', 'author', 'requires', 'tested', 'homepage', 'downloaded', 'slug') as $key )
    258                 $api->$key = wp_kses($api->$key, $plugins_allowedtags);
     257        foreach ( array( 'version', 'author', 'requires', 'tested', 'homepage', 'downloaded', 'slug' ) as $key ) {
     258                if ( isset( $api->$key ) )
     259                        $api->$key = wp_kses( $api->$key, $plugins_allowedtags );
     260        }
    259261
    260262        $section = isset($_REQUEST['section']) ? stripslashes( $_REQUEST['section'] ) : 'description'; //Default to the Description tab, Do not translate, API returns English.
Note: See TracChangeset for help on using the changeset viewer.