Check if property exists on plugins_api() returned object in install_plugin_information(). props hakre, fixes #18181.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d5cf830175
commit
fdedc8a500
|
@ -254,8 +254,10 @@ function install_plugin_information() {
|
||||||
//Sanitize HTML
|
//Sanitize HTML
|
||||||
foreach ( (array)$api->sections as $section_name => $content )
|
foreach ( (array)$api->sections as $section_name => $content )
|
||||||
$api->sections[$section_name] = wp_kses($content, $plugins_allowedtags);
|
$api->sections[$section_name] = wp_kses($content, $plugins_allowedtags);
|
||||||
foreach ( array('version', 'author', 'requires', 'tested', 'homepage', 'downloaded', 'slug') as $key )
|
foreach ( array( 'version', 'author', 'requires', 'tested', 'homepage', 'downloaded', 'slug' ) as $key ) {
|
||||||
$api->$key = wp_kses($api->$key, $plugins_allowedtags);
|
if ( isset( $api->$key ) )
|
||||||
|
$api->$key = wp_kses( $api->$key, $plugins_allowedtags );
|
||||||
|
}
|
||||||
|
|
||||||
$section = isset($_REQUEST['section']) ? stripslashes( $_REQUEST['section'] ) : 'description'; //Default to the Description tab, Do not translate, API returns English.
|
$section = isset($_REQUEST['section']) ? stripslashes( $_REQUEST['section'] ) : 'description'; //Default to the Description tab, Do not translate, API returns English.
|
||||||
if ( empty($section) || ! isset($api->sections[ $section ]) )
|
if ( empty($section) || ! isset($api->sections[ $section ]) )
|
||||||
|
|
Loading…
Reference in New Issue