Opened 10 years ago
Closed 10 years ago
#30827 closed defect (bug) (fixed)
wp_can_install_language_pack(): Direct access to $upgrader->fs_connect() can produce undefined index notices
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.2 | Priority: | low |
Severity: | minor | Version: | 4.0 |
Component: | Filesystem API | Keywords: | has-patch |
Focuses: | Cc: |
Description
Example: Notice: Undefined index: fs_no_content_dir in /src/wp-admin/includes/class-wp-upgrader.php on line 182
That's because the init() method isn't called here, which sets up the strings. We should either do $upgrader->init()
or $upgrader->generic_strings()
.
Attachments (1)
Change History (8)
#2
@
10 years ago
@ocean90 What are the steps to reproduce the notices? I want to test your patch but am having trouble getting PHP to throw a notice during language pack installation.
#3
@
10 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 31074:
#4
@
10 years ago
- Keywords fixed-major added
- Resolution fixed deleted
- Status changed from closed to reopened
This ticket was mentioned in Slack in #core by jorbin. View the logs.
10 years ago
#6
@
10 years ago
I'm so-so on including this in 4.1.1, I could go either way, unless someone feels strongly, lets close it on 4.2.
Realistically, it's only a PHP notice, and none of the strings missing should be needed during a translation install, it's also unlikely any other alterations will be made to this file in 4.1.1 (meaning one less file in a 4.1 -> 4.1.1 update).
Worst case, as @ocean90 hit here, the upgrade can't find the wp-content directory and it emits a PHP notice + fs_no_content_dir
instead of a human-readable message.. a case that should be exceedingly rare.
I see no harm in fixing or not fixing this in 4.1.1.