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

SVN:trunk[1271]
This commit is contained in:
Romain Quetiez
2011-05-20 13:42:57 +00:00
parent 5c7c7b98ee
commit f8d794bc93

View File

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