Jelajahi Sumber

Reduces the annoyance of bug #408 (dates not visible in the case log if PHP < 5.3)

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1271 a333f486-631f-4898-b8df-5754b55c2be0
romainq 14 tahun lalu
induk
melakukan
f0b144739a
1 mengubah file dengan 3 tambahan dan 0 penghapusan
  1. 3 0
      core/ormcaselog.class.inc.php

+ 3 - 0
core/ormcaselog.class.inc.php

@@ -79,7 +79,10 @@ class ormCaseLog {
 			$iPos += $this->m_aIndex[$index]['text_length'];
 
 			$sEntry = '<div class="caselog_header'.$sOpen.'">';
+			// Temporary workaround: PHP < 5.3 issues an irrelevant warning -see trac #408
+			$iPrevLevel = error_reporting(E_ERROR);
 			$sEntry .= sprintf(Dict::S('UI:CaseLog:Header_Date_UserName'), $this->m_aIndex[$index]['date']->format(Dict::S('UI:CaseLog:DateFormat')), $this->m_aIndex[$index]['user_name']);
+			error_reporting($iPrevLevel);
 			$sEntry .= '</div>';
 			$sEntry .= '<div class="caselog_entry"'.$sDisplay.'>';
 			$sEntry .= $sTextEntry;