Making WordPress.org


Ignore:
Timestamp:
04/12/2023 05:32:20 AM (20 months ago)
Author:
dd32
Message:

Plugin Directory: When a plugin has an empty or malformed Requires Plugins header, don't store empty slug keys.

See #6921.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php

    r12533 r12534  
    243243
    244244        // Validate whether the dependencies are met by WordPress.org-hosted plugins.
    245         $requires_plugins       = array_map( 'trim', explode( ',', $headers->RequiresPlugins ) );
     245        $requires_plugins       = array_filter( array_map( 'trim', explode( ',', $headers->RequiresPlugins ) ) );
    246246        $requires_plugins_unmet = false;
    247247        foreach ( $requires_plugins as $requires_plugin_slug ) {
Note: See TracChangeset for help on using the changeset viewer.