Skip to content
Snippets Groups Projects
Commit b0b98075 authored by Peter Rotich's avatar Peter Rotich
Browse files

lint: oopses

parent bb2acd50
No related branches found
No related tags found
No related merge requests found
...@@ -78,11 +78,12 @@ class Attachment { ...@@ -78,11 +78,12 @@ class Attachment {
static function lookup($var, $objectId=0) { static function lookup($var, $objectId=0) {
$id = is_numeric($var) ? $var : self::getIdByFileHash($var, $oid); $id = is_numeric($var) ? $var : self::getIdByFileHash($var,
$objectId);
return ($id return ($id
&& is_numeric($id) && is_numeric($id)
&& ($attach = new Attachment($id, $oid)) && ($attach = new Attachment($id, $objectId))
&& $attach->getId()==$id && $attach->getId()==$id
) ? $attach : null; ) ? $attach : null;
} }
......
...@@ -278,7 +278,7 @@ class Task extends TaskModel { ...@@ -278,7 +278,7 @@ class Task extends TaskModel {
$vars['staffId'] = $thisstaff->getId(); $vars['staffId'] = $thisstaff->getId();
$vars['poster'] = $thisstaff; $vars['poster'] = $thisstaff;
if (!$vars['ip_address'] && $_SERVER['REMOTE_ADDR']) if (!$vars['ip_address'] && $_SERVER['REMOTE_ADDR'])
$vars['ip_address'] = $SERVER['REMOTE_ADDR']; $vars['ip_address'] = $_SERVER['REMOTE_ADDR'];
$thread->addDescription($vars); $thread->addDescription($vars);
......
...@@ -486,7 +486,7 @@ Class ThreadEntry { ...@@ -486,7 +486,7 @@ Class ThreadEntry {
if(!$error) if(!$error)
$error = sprintf(_S('Unable to import attachment - %s'), $error = sprintf(_S('Unable to import attachment - %s'),
$attachment['name']); $attachment['name']);
//FIXME: $this->logComment(); //FIXME: logComment here
$this->getThread()->getObject()->logNote( $this->getThread()->getObject()->logNote(
_S('File Import Error'), $error, _S('SYSTEM'), false); _S('File Import Error'), $error, _S('SYSTEM'), false);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment