From 4ac6469200d2dfb62287c9d373d56dab6b1c7c1a Mon Sep 17 00:00:00 2001 From: Sam Georges Date: Thu, 23 Oct 2014 08:11:11 +1100 Subject: [PATCH] Original data does not exist for new objects --- modules/cms/classes/CmsCompoundObject.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cms/classes/CmsCompoundObject.php b/modules/cms/classes/CmsCompoundObject.php index a28613ed2..a086ce4a4 100644 --- a/modules/cms/classes/CmsCompoundObject.php +++ b/modules/cms/classes/CmsCompoundObject.php @@ -223,7 +223,7 @@ class CmsCompoundObject extends CmsObject } if ($this->code) { - if ($this->wrapCodeToPhpTags() && $this->originalData['code'] != $this->code) { + if ($this->wrapCodeToPhpTags() && array_get($this->originalData, 'code') != $this->code) { $code = preg_replace('/^\<\?php/', '', $this->code); $code = preg_replace('/^\<\?/', '', $code); $code = preg_replace('/\?>$/', '', $code);