Opened 8 years ago
Closed 8 years ago
#45593 closed enhancement (fixed)
Docs: Parameter '$plugin_editable_files' type is not compatible with declaration
| Reported by: | subrataemfluence | Owned by: | pento |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.1 |
| Component: | Plugins | Version: | 5.0 |
| Severity: | normal | Keywords: | has-patch good-first-bug |
| Cc: | Focuses: | docs |
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
@
8 years ago
- Focuses docs added; coding-standards removed
- Keywords good-first-bug added
- Summary Type compatibility: Parameter '$plugin_editable_files' type is not compatible with declaration → Docs: Parameter '$plugin_editable_files' type is not compatible with declaration
- Type defect (bug) → enhancement
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 44464: