Make WordPress Core

Ticket #48199: 48199.diff

File 48199.diff, 1.2 KB (added by pbiron, 4 years ago)
  • src/wp-admin/includes/class-wp-debug-data.php

    From 4a822a13818ceb6cdc408997e73e3634dd10dcd7 Mon Sep 17 00:00:00 2001
    From: Paul Biron <paul@sparrowhawkcomputing.com>
    Date: Mon, 27 Apr 2020 10:02:22 -0600
    Subject: [PATCH] Correctly check whether the themes directory is writeable,
     even when the current theme is symlink'd.
    
    ---
     src/wp-admin/includes/class-wp-debug-data.php | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/wp-admin/includes/class-wp-debug-data.php b/src/wp-admin/includes/class-wp-debug-data.php
    index 42f9a788f7..b7fe30c08b 100644
    a b class WP_Debug_Data { 
    322322                $is_writable_wp_content_dir     = wp_is_writable( WP_CONTENT_DIR );
    323323                $is_writable_upload_dir         = wp_is_writable( $upload_dir['basedir'] );
    324324                $is_writable_wp_plugin_dir      = wp_is_writable( WP_PLUGIN_DIR );
    325                 $is_writable_template_directory = wp_is_writable( get_template_directory() . '/..' );
     325                $is_writable_template_directory = wp_is_writable( get_theme_root( get_template() ) );
    326326
    327327                $info['wp-filesystem'] = array(
    328328                        'label'       => __( 'Filesystem Permissions' ),