FIX Ensure constant is accessed correctly

This commit is contained in:
Guy Marriott 2019-07-12 15:24:10 +12:00
parent 9feef185dc
commit 58f89801b0
No known key found for this signature in database
GPG Key ID: A80F9ACCB86D3DA7
1 changed files with 2 additions and 1 deletions

View File

@ -60,7 +60,8 @@ class ThemeResolver
if ($index > 0) {
// 4.0 didn't have support for themes in the public webroot
$publicConstantDefined = defined('SSViewer::PUBLIC_THEME');
$constant = SSViewer::class . '::PUBLIC_THEME';
$publicConstantDefined = defined($constant);
// Check if the default is public themes
$publicDefault = $publicConstantDefined && $themes[0] === SSViewer::PUBLIC_THEME;