Opened 6 years ago
Closed 6 years ago
#45593 closed enhancement (fixed)
Docs: Parameter '$plugin_editable_files' type is not compatible with declaration
Reported by: | subrataemfluence | Owned by: | pento |
---|---|---|---|
Milestone: | 5.1 | Priority: | normal |
Severity: | normal | Version: | 5.0 |
Component: | Plugins | Keywords: | has-patch good-first-bug |
Focuses: | docs | Cc: |
Description
The parameter $plugin_editable_files
accepts an array in the following function but the in Doc block, it has been defined as string
, which is incorrect. It has to be declared as an array.
<?php /** * Makes a tree structure for the Plugin Editor's file list. * * @since 4.9.0 * @access private * * @param string $plugin_editable_files List of plugin file paths. * ... */ function wp_make_plugin_file_tree( $plugin_editable_files ) { $tree_list = array(); foreach ( $plugin_editable_files as $plugin_file ) { ... } return $tree_list; }
Here is a call made in plugin-editor.php
<?php $plugin_editable_files = array(); foreach ( $plugin_files as $plugin_file ) { ... $plugin_editable_files[] = $plugin_file; } ... wp_print_plugin_file_tree( wp_make_plugin_file_tree( $plugin_editable_files ) ); ...
where $plugin_editable_files
is passed as an array.
Attachments (1)
Change History (5)
#1
@
6 years ago
- Focuses docs added; coding-standards removed
- Keywords good-first-bug added
- Summary changed from Type compatibility: Parameter '$plugin_editable_files' type is not compatible with declaration to Docs: Parameter '$plugin_editable_files' type is not compatible with declaration
- Type changed from defect (bug) to enhancement
#2
@
6 years ago
- Milestone changed from Awaiting Review to 5.1
- Owner set to SergeyBiryukov
- Status changed from new to reviewing
Note: See
TracTickets for help on using
tickets.
In 44464: