Explorar o código

N°1038 Fatal error on transition with AttributeBlob or AttributeCaseLog

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4907 a333f486-631f-4898-b8df-5754b55c2be0
glajarige %!s(int64=7) %!d(string=hai) anos
pai
achega
30511f5040
Modificáronse 2 ficheiros con 10 adicións e 1 borrados
  1. 8 1
      core/ormcaselog.class.inc.php
  2. 2 0
      core/ormdocument.class.inc.php

+ 8 - 1
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()
 	{

+ 2 - 0
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);
 	}