Original data does not exist for new objects

This commit is contained in:
Sam Georges 2014-10-23 08:11:11 +11:00
parent b312d53d85
commit 4ac6469200
1 changed files with 1 additions and 1 deletions

View File

@ -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);