diff --git a/core/ormcaselog.class.inc.php b/core/ormcaselog.class.inc.php index 0a4680710..814cc91d5 100644 --- a/core/ormcaselog.class.inc.php +++ b/core/ormcaselog.class.inc.php @@ -191,8 +191,15 @@ class ormCaseLog { public function __toString() { - return $this->m_sLog; + if($this->IsEmpty()) return ''; + + return $this->m_sLog; } + + public function IsEmpty() + { + return ($this->m_sLog === null); + } public function ClearModifiedFlag() { diff --git a/core/ormdocument.class.inc.php b/core/ormdocument.class.inc.php index 7d144bcd8..585c4a3d2 100644 --- a/core/ormdocument.class.inc.php +++ b/core/ormdocument.class.inc.php @@ -51,6 +51,8 @@ class ormDocument public function __toString() { + if($this->IsEmpty()) return ''; + return MyHelpers::beautifulstr($this->m_data, 100, true); }