Opened 9 years ago
Closed 7 years ago
#42227 closed defect (bug) (fixed)
PHPDoc correction for src/wp-admin/includes/class-wp-filesystem-base.php
| Reported by: | Jaydeep Rami | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.2 |
| Component: | Filesystem API | Version: | 4.9 |
| Severity: | normal | Keywords: | has-patch needs-testing |
| Cc: | Focuses: | docs |
Description
There are a wrong argument type in PHPDoc. Below is file path:
/wp-admin/includes/class-wp-filesystem-base.php
Thanks,
Attachments (3)
Change History (12)
#1
follow-up:
↓ 2
@
9 years ago
- Component General → Filesystem API
Hi Jaydeep, thanks for the patch!
The existing docs for these arguments are correct, it's just that default values don't match the expected type.
$themeshould either be documented asstring|false, or the default value should be changed to an empty string, here and inget_theme_root()as well.$modeshould be documented asint|false, here and in otherclass-wp-filesystem-*.phpfiles as well.
#2
in reply to: ↑ 1
@
9 years ago
Replying to SergeyBiryukov: Thank you @SergeyBiryukov, I understood. Thanks for the explanation!
Hi Jaydeep, thanks for the patch!
The existing docs for these arguments are correct, it's just that default values don't match the expected type.
$themeshould either be documented asstring|false, or the default value should be changed to an empty string, here and and inget_theme_root()as well.$modeshould be documented asint|false, here and in otherclass-wp-filesystem-*.phpfiles as well.
#3
@
7 years ago
- Milestone Awaiting Review → 5.2
- Owner set to
- Status new → reviewing
Related: #46779
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
7 years ago
#5
@
7 years ago
- Keywords has-patch needs-refresh added
As per today's bug scrub, the patch needs a refresh to land in 5.2.
Cheers,
Jb
#7
@
7 years ago
$mode should be documented as int|false, here and in other class-wp-filesystem-*.php files as well.
If I understand it correctly, the third patch must be OK.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Fixed: PHPDoc correction for src/wp-admin/includes/class-wp-filesystem-base.php