소스 검색

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 7 년 전
부모
커밋
30511f5040
2개의 변경된 파일10개의 추가작업 그리고 1개의 파일을 삭제
  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);
 	}