Making WordPress.org

Changeset 10035


Ignore:
Timestamp:
07/08/2020 04:41:05 PM (4 years ago)
Author:
ryelle
Message:

Plugin Directory: Fix PHP warnings in block validator

See #5303

File:
1 edited

Legend:

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

    r10015 r10035  
    245245        $this->block_json_files = Filesystem::list_files( $base_dir, true, '!(?:^|/)block\.json$!i' );
    246246        if ( ! empty( $this->block_json_files ) ) {
    247             foreach ( $block_json_files as $filename ) {
     247            foreach ( $this->block_json_files as $filename ) {
    248248                $blocks_in_file = Import::find_blocks_in_file( $filename );
    249249                $relative_filename = $this->relative_filename( $filename );
     
    364364     */
    365365    function check_block_tag() {
    366         if ( empty( $this->readme->tags ) || !in_array( 'block', array_map( 'strtolower', $this->readme_tags ) ) ) {
     366        if ( empty( $this->readme->tags ) || ! in_array( 'block', array_map( 'strtolower', $this->readme->tags ) ) ) {
    367367            $this->record_result( __FUNCTION__,
    368368                'warning',
     
    595595                'warning',
    596596                sprintf( __( 'Found %s PHP asset files.', 'wporg-plugins' ), $count ),
    597                 array_map( array( $this, relative_filename ), $this->asset_php_files )
     597                array_map( null, array( $this->relative_filename( $file ) ), $this->asset_php_files )
    598598            );
    599599        }
Note: See TracChangeset for help on using the changeset viewer.