From 77110af30a035c45e6874f4700355a9005f681c1 Mon Sep 17 00:00:00 2001 From: mutec Date: Fri, 28 Aug 2020 15:46:54 +0200 Subject: [PATCH] fix updating the styles to 5.3 If `Style::$imagePath` is empty, it resulted in copying the shole WSC-folder into a style-asset-folder - and doing this until we reache the timeout limits. Including `global.php` ended up in trying to define the option-constants (especially the fixed-value-options like `MODULE_ATTACHMENTS`) again while they are already defined - which causes a Fatal Error-Message. --- .../install/files/acp/update_com.woltlab.wcf_5.3_style.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.3_style.php b/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.3_style.php index 092d95bbd6..b5669d8509 100644 --- a/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.3_style.php +++ b/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.3_style.php @@ -1,5 +1,4 @@ imagePath != 'images/') { - $srcPath = FileUtil::addTrailingSlash(WCF_DIR.$style->imagePath); + $srcPath = FileUtil::addTrailingSlash(WCF_DIR.$style->imagePath); + if ($srcPath !== WCF_DIR && $srcPath !== WCF_DIR.'images/') { if ($srcPath == $style->getAssetPath()) { $srcPath = FileUtil::removeTrailingSlash($style->getAssetPath()) . '.old53/'; } -- 2.20.1