[wp-trac] [WordPress Trac] #51182: Theme_Installer_skin::do_overwrite does not work on a Windows server
WordPress Trac
noreply at wordpress.org
Fri Aug 28 21:02:29 UTC 2020
#51182: Theme_Installer_skin::do_overwrite does not work on a Windows server
-----------------------------+-----------------------------
Reporter: bobbingwide | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version: 5.5
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
In my local Windows development environment I tried the new logic to
upload plugin and theme .zip files. It worked for plugins but not for
themes.
I traced through the code and determined that $current_theme_data was
never being set because this loop assumes the character separator is
always '/'.
{{{
foreach ( $all_themes as $theme ) {
if ( rtrim( $theme->get_stylesheet_directory(), '/' ) !== $folder ) {
continue;
}
$current_theme_data = $theme;
}
}}}
In my windows environment
$theme->get_stylesheet_directory() returns, for example
C:\apache\htdocs\cwiccer/wp-content/themes/twentyfifteen
whereas the value of $folder was
C:/apache/htdocs/cwiccer/wp-content/themes/twentyfifteen
Since $current_theme_data is not set the option to replace the theme is
not displayed.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51182>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list