Skip to content

Commit

Permalink
Boost: hide file warnings when checking if a directory is read-write (#…
Browse files Browse the repository at this point in the history
…36150)

* Hide warnings gnerated by this command

* changelog
  • Loading branch information
donnchawp authored Mar 4, 2024
1 parent 2037beb commit 678eaca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private static function enable_caching() {
*/
private static function verify_wp_content_writable() {
$filename = WP_CONTENT_DIR . '/' . uniqid() . '.txt';
$result = file_put_contents( $filename, 'test' ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_file_put_contents
$result = @file_put_contents( $filename, 'test' ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_file_put_contents, WordPress.PHP.NoSilencedErrors.Discouraged
wp_delete_file( $filename );

if ( $result === false ) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Boost: hide warnings when checking if a directory is RO or not.

0 comments on commit 678eaca

Please sign in to comment.