Skip to content

Commit

Permalink
Update contract_item.class.php
Browse files Browse the repository at this point in the history
  • Loading branch information
yllen authored and trasher committed Oct 27, 2017
1 parent 72e8ceb commit c23aa83
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion inc/contract_item.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ static function countForContract(Contract $item) {
['DISTINCT FIELDS' => "itemtype",
'WHERE' => "`glpi_contracts_items`.`contracts_id`
= '".$item->getField('id')."'"]) as $data) {
$itemt = getItemForItemtype($data['itemtype']);
if (!$itemt = getItemForItemtype($data['itemtype'])) {
continue;
}

$query = "SELECT COUNT(*) AS cpt
FROM `glpi_contracts_items`, `".$itemt->getTable()."`
Expand Down

0 comments on commit c23aa83

Please sign in to comment.