Fix scrutinizer bug

This commit is contained in:
Laurent Destailleur 2018-01-12 15:19:02 +01:00
parent 7da9911db1
commit 64ae70d106
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ class Subscription extends CommonObject
$sql.= " '".$this->db->escape($this->note)."')"; $sql.= " '".$this->db->escape($this->note)."')";
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if ($res===false) { if (! $resql) {
$error++; $error++;
$this->errors[] = $this->db->lasterror(); $this->errors[] = $this->db->lasterror();
} }

View File

@ -663,7 +663,7 @@ if ($resql)
print '<tr>'; print '<tr>';
print '<td>'; print '<td>';
print '<input name="label" class="flat minwidth200" type="text" value="'.GETPOST("label","alpha").'">'; print '<input name="label" class="flat minwidth200" type="text" value="'.GETPOST("label","alpha").'">';
if ($options) { if (is_array($options) && count($options)) {
print '<br>'.$langs->trans("Rubrique").': '; print '<br>'.$langs->trans("Rubrique").': ';
print Form::selectarray('cat1', $options, GETPOST('cat1'), 1); print Form::selectarray('cat1', $options, GETPOST('cat1'), 1);
} }