Opened 7 years ago
Closed 5 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 |
---|---|---|---|
Milestone: | 5.2 | Priority: | normal |
Severity: | normal | Version: | 4.9 |
Component: | Filesystem API | Keywords: | has-patch needs-testing |
Focuses: | docs | Cc: |
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
@
7 years ago
- Component changed from General to 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.
$theme
should either be documented asstring|false
, or the default value should be changed to an empty string, here and inget_theme_root()
as well.$mode
should be documented asint|false
, here and in otherclass-wp-filesystem-*.php
files as well.
#2
in reply to:
↑ 1
@
7 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.
$theme
should either be documented asstring|false
, or the default value should be changed to an empty string, here and and inget_theme_root()
as well.$mode
should be documented asint|false
, here and in otherclass-wp-filesystem-*.php
files as well.
#3
@
6 years ago
- Milestone changed from Awaiting Review to 5.2
- Owner set to SergeyBiryukov
- Status changed from new to reviewing
Related: #46779
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
6 years ago
#5
@
6 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
@
5 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.
Fixed: PHPDoc correction for src/wp-admin/includes/class-wp-filesystem-base.php