Index: branches/5.2.x/core/units/themes/theme_item.php =================================================================== diff -u -N -r14244 -r16084 --- branches/5.2.x/core/units/themes/theme_item.php (.../theme_item.php) (revision 14244) +++ branches/5.2.x/core/units/themes/theme_item.php (.../theme_item.php) (revision 16084) @@ -1,6 +1,6 @@ GetDBField('StylesheetFile') ?: 'inc/style.css', '/'); + + $theme_path = FULL_PATH . '/themes/' . $this->GetDBField('Name'); + $stylesheet_file = $theme_path . '/' . $stylesheet_file; + + if ( !file_exists($stylesheet_file) ) { + return false; + } + + if ( $as_url ) { + /** @var FileHelper $file_helper */ + $file_helper = $this->Application->recallObject('FileHelper'); + + return $file_helper->pathToUrl($stylesheet_file); + } + + return $stylesheet_file; + } + }