Opened 4 years ago
Closed 4 years ago
#50373 closed defect (bug) (fixed)
Notice: Trying to access array offset on value of type bool in /wp-admin/includes/class-wp-filesystem-direct.php on line 260
Reported by: | logig | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.5 | Priority: | normal |
Severity: | normal | Version: | 5.4.2 |
Component: | Filesystem API | Keywords: | needs-patch |
Focuses: | Cc: |
Description
Notice: Trying to access array offset on value of type bool in /wp-admin/includes/class-wp-filesystem-direct.php on line 260 Notice: Trying to access array offset on value of type bool in /wp-admin/includes/class-wp-filesystem-direct.php on line 260 Notice: Trying to access array offset on value of type bool in /wp-admin/includes/class-wp-filesystem-direct.php on line 260 Notice: Trying to access array offset on value of type bool in /wp-admin/includes/class-wp-filesystem-direct.php on line 260 Notice: Trying to access array offset on value of type bool in /wp-admin/includes/class-wp-filesystem-direct.php on line 260
There are many Notices when updating.
Change History (4)
#2
@
4 years ago
- Component changed from Upgrade/Install to Filesystem API
- Milestone changed from Awaiting Review to 5.5
#3
@
4 years ago
Hi there, welcome to WordPress Trac! Thanks for the report.
The PHP manual mentions that fileowner() and filegroup() return false on failure, but doesn't mention the same for posix_getpwuid() or posix_getgrgid() used in the WP_Filesystem_Direct
and WP_Filesystem_SSH2
classes.
Apparently they can still return false in some circumstances, per these comments:
https://www.php.net/manual/en/function.posix-getpwuid.php#45994
https://www.php.net/manual/en/function.posix-getgrgid.php#90794
So checking the result seems like a good idea.
Note: See
TracTickets for help on using
tickets.
PHP version 7.4.x