Merge pull request #10434 from frederic34/patch-17
The variable $i does not seem to be defined for all execution paths
This commit is contained in:
commit
1b8a873987
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2012-2018 Charlene BENKE <charlie@patas-monkey.com>
|
/* Copyright (C) 2012-2018 Charlene BENKE <charlie@patas-monkey.com>
|
||||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
* Copyright (C) 2015-2019 Frederic France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -104,12 +104,10 @@ class box_task extends ModeleBoxes
|
|||||||
$sql.= $db->plimit($max, 0);
|
$sql.= $db->plimit($max, 0);
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
|
||||||
{
|
|
||||||
$num = $db->num_rows($result);
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num)
|
if ($result) {
|
||||||
{
|
$num = $db->num_rows($result);
|
||||||
|
while ($i < $num) {
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
$this->info_box_contents[$i][] = array(
|
$this->info_box_contents[$i][] = array(
|
||||||
'td' => '',
|
'td' => '',
|
||||||
@ -131,11 +129,11 @@ class box_task extends ModeleBoxes
|
|||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
dol_print_error($this->db);
|
||||||
}
|
}
|
||||||
else dol_print_error($this->db);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Add the sum at the bottom of the boxes
|
// Add the sum at the bottom of the boxes
|
||||||
$this->info_box_contents[$i][] = array('tr' => 'class="liste_total"', 'td' => '', 'text' => $langs->trans("Total")." ".$textHead);
|
$this->info_box_contents[$i][] = array('tr' => 'class="liste_total"', 'td' => '', 'text' => $langs->trans("Total")." ".$textHead);
|
||||||
$this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => number_format($totalnb, 0, ',', ' ')." ".$langs->trans("Tasks"));
|
$this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => number_format($totalnb, 0, ',', ' ')." ".$langs->trans("Tasks"));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user