$this->variables['overrideScssCustom'] = $tmp['custom'];
}
- if ($this->variables['pageLogo']) {
+ if ($this->variables['pageLogo'] && file_exists($this->style->getAssetPath().$this->variables['pageLogo'])) {
$file = new UploadFile($this->style->getAssetPath().$this->variables['pageLogo'], basename($this->variables['pageLogo']), true, true, true);
UploadHandler::getInstance()->registerFilesByField('pageLogo', [
$file,
]);
}
- if ($this->variables['pageLogoMobile']) {
+ if ($this->variables['pageLogoMobile'] && file_exists($this->style->getAssetPath().$this->variables['pageLogoMobile'])) {
$file = new UploadFile($this->style->getAssetPath().$this->variables['pageLogoMobile'], basename($this->variables['pageLogoMobile']), true, true, true);
UploadHandler::getInstance()->registerFilesByField('pageLogoMobile', [
$file,
$this->styleName = $this->style->styleName;
$this->styleVersion = $this->style->styleVersion;
$this->templateGroupID = $this->style->templateGroupID;
- if ($this->style->image) {
+ if ($this->style->image && file_exists(WCF_DIR.'images/'.$this->style->image)) {
$file = new UploadFile(WCF_DIR.'images/'.$this->style->image, $this->style->image, true, true, false);
UploadHandler::getInstance()->registerFilesByField('image', [
$file,
]);
}
- if ($this->style->image2x) {
+ if ($this->style->image2x && file_exists(WCF_DIR.'images/'.$this->style->image2x)) {
$file = new UploadFile(WCF_DIR.'images/'.$this->style->image2x, $this->style->image2x, true, true, false);
UploadHandler::getInstance()->registerFilesByField('image2x', [
$file,
]);
}
- if ($this->style->coverPhotoExtension) {
+ if ($this->style->coverPhotoExtension && file_exists($this->style->getCoverPhotoLocation())) {
$file = new UploadFile($this->style->getCoverPhotoLocation(), $this->style->getCoverPhoto(), true, true, false);
UploadHandler::getInstance()->registerFilesByField('coverPhoto', [
$file,