From a9053b4b67585334c45486b658c55540a047af88 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 18 Mar 2009 17:14:59 +0000 Subject: [PATCH] BUGFIX Checking for existence of original before trying to get translation in LeftAndMain->currentPage() git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@73344 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/LeftAndMain.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/LeftAndMain.php b/code/LeftAndMain.php index 33fd85e9..648d3ef2 100644 --- a/code/LeftAndMain.php +++ b/code/LeftAndMain.php @@ -902,7 +902,7 @@ JS; $id = $this->currentPageID(); if($id && is_numeric($id)) { $page = DataObject::get_by_id($this->stat('tree_class'), $id); - if(Translatable::is_enabled() && $page->Lang && $page->Lang != Translatable::current_lang()) { + if($page && Translatable::is_enabled() && $page->Lang && $page->Lang != Translatable::current_lang()) { return false; } else { return $page;