diff --git a/include/class.thread.php b/include/class.thread.php index b6fc9b5f15504d779dc7619d0e4a6fc384ab8bd2..b7641e49216e65e56647624036d93ef3077135ad 100644 --- a/include/class.thread.php +++ b/include/class.thread.php @@ -913,9 +913,18 @@ implements TemplateVariable { _S($error_descriptions[$error])); } // No need to log the missing-file error number - if ($error != UPLOAD_ERR_NO_FILE) - $this->getThread()->getObject()->logNote( - _S('File Import Error'), $error, _S('SYSTEM'), false); + if ($error != UPLOAD_ERR_NO_FILE + && ($thread = $this->getThread()) + ) { + // Log to the thread directly, since alerts should be + // suppressed and this is defintely a system message + $thread->addNote(array( + 'title' => _S('File Import Error'), + 'note' => new TextThreadEntryBody($error), + 'poster' => 'SYSTEM', + 'staffId' => 0, + )); + } continue; } @@ -2478,7 +2487,7 @@ implements TemplateVariable { )); } - function addNote($vars, &$errors) { + function addNote($vars, &$errors=array()) { //Add ticket Id. $vars['threadId'] = $this->getId();