diff --git a/lib/front/front.class.php b/lib/front/front.class.php index 2c45f6e216..07a5c3b4d7 100644 --- a/lib/front/front.class.php +++ b/lib/front/front.class.php @@ -501,7 +501,7 @@ EOT; * @access public * @return string */ - public static function linkButton($label = '', $link = '', $target = 'self', $misc = '', $class) + public static function linkButton($label = '', $link = '', $target = 'self', $misc = '', $class = '') { global $config, $lang; diff --git a/module/action/model.php b/module/action/model.php index a2245fa6f5..1ddb410646 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -240,16 +240,17 @@ class actionModel extends model } foreach($typeTrashes as $objectType => $objectIds) { + if(!isset($this->config->objectTables[$objectType]))continue; + $objectIds = array_unique($objectIds); $table = $this->config->objectTables[$objectType]; $field = $this->config->action->objectNameFields[$objectType]; - if(!$table) continue; $objectNames[$objectType] = $this->dao->select("id, $field AS name")->from($table)->where('id')->in($objectIds)->fetchPairs(); } /* Add name field to the trashes. */ - foreach($trashes as $trash) $trash->objectName = $objectNames[$trash->objectType][$trash->objectID]; + foreach($trashes as $trash) $trash->objectName = isset($objectNames[$trash->objectType][$trash->objectID]) ? $objectNames[$trash->objectType][$trash->objectID] : ''; return $trashes; } diff --git a/module/action/view/trash.html.php b/module/action/view/trash.html.php index 26c17eaa75..b323371261 100755 --- a/module/action/view/trash.html.php +++ b/module/action/view/trash.html.php @@ -38,7 +38,7 @@ objectType == 'case' ? 'testcase' : $action->objectType;?>