diff --git a/admin/code/LeftAndMain.php b/admin/code/LeftAndMain.php index 20b652fa963..1a12da84c1f 100644 --- a/admin/code/LeftAndMain.php +++ b/admin/code/LeftAndMain.php @@ -1172,7 +1172,7 @@ public function PreviewLink() { * @return string */ public function CMSVersion() { - if(file_exists(CMS_PATH . '/silverstripe_version')) { + if(defined('CMS_PATH') && file_exists(CMS_PATH . '/silverstripe_version')) { $sapphireVersion = file_get_contents(CMS_PATH . '/silverstripe_version'); } else { $sapphireVersion = file_get_contents(SAPPHIRE_PATH . '/silverstripe_version');