fix phan (#29513)
* fix phan * Update donation.php * Update project.php * Update facture.class.php
This commit is contained in:
parent
2862a61ee1
commit
ff35192b64
4 changed files with 10 additions and 5 deletions
|
|
@ -5372,8 +5372,7 @@ class Facture extends CommonInvoice
|
|||
$sql .= ' AND entity = '.($this->entity > 0 ? $this->entity : $conf->entity);
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
if ($resql && $this->db->num_rows($resql) > 0) {
|
||||
$res = $this->db->fetch_array($resql);
|
||||
if ($resql && $this->db->num_rows($resql) > 0 && $res = $this->db->fetch_array($resql)) {
|
||||
$last = $res['max(situation_counter)'];
|
||||
return ($last == $this->situation_counter);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -200,7 +200,9 @@ if ($resql) {
|
|||
$num_rows = $db->num_rows($resql);
|
||||
while ($i < $num_rows) {
|
||||
$array = $db->fetch_array($resql);
|
||||
array_push($def, $array[0]);
|
||||
if (is_array($array)) {
|
||||
array_push($def, $array[0]);
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -382,7 +382,9 @@ if ($resql) {
|
|||
$num_rows = $db->num_rows($resql);
|
||||
while ($i < $num_rows) {
|
||||
$array = $db->fetch_array($resql);
|
||||
array_push($def, $array[0]);
|
||||
if (is_array($array)) {
|
||||
array_push($def, $array[0]);
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -511,7 +511,9 @@ if ($resql) {
|
|||
$num_rows = $db->num_rows($resql);
|
||||
while ($i < $num_rows) {
|
||||
$array = $db->fetch_array($resql);
|
||||
array_push($def, $array[0]);
|
||||
if (is_array($array)) {
|
||||
array_push($def, $array[0]);
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue