Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #56713, comment 5


Ignore:
Timestamp:
10/17/2022 12:37:51 AM (3 years ago)
Author:
costdev
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #56713, comment 5

    v1 v2  
    3535Therefore, wrapping each of these calls to `$wp_filesystem->chmod()` with an `! $wp_filesystem->is_writable()` check should make sure that `chmod()` is only run when the path is not writable. This is done in most other places in Core, but not all.
    3636
    37 Wrapping various `chmod()` calls with `if ( $wp_filesystem->is_writable() ) {}` and defining `FS_METHOD` as `direct` seems to update just fine for me.
     37Wrapping various `chmod()` calls with `if ( ! $wp_filesystem->is_writable() ) {}` and defining `FS_METHOD` as `direct` seems to update just fine for me.
    3838
    3939The `chmod()` calls I found to be relevant to this issue are: