Fix warnings

This commit is contained in:
Laurent Destailleur 2023-08-24 15:49:53 +02:00
parent 58d2248698
commit bcb85bdb13
2 changed files with 9 additions and 5 deletions

View file

@ -1892,10 +1892,10 @@ abstract class CommonObject
dol_syslog(get_class($this).'::fetchObjectFrom', LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$row = $this->db->fetch_row($resql);
$obj = $this->db->fetch_object($resql);
// Test for avoid error -1
if ($row[0] > 0) {
$result = $this->fetch($row[0]);
if ($obj) {
$result = $this->fetch($obj->rowid);
}
}

View file

@ -282,12 +282,16 @@ trait CommonPeople
$this->lastname = dol_ucwords(dol_strtolower($this->lastname));
$this->firstname = dol_ucwords(dol_strtolower($this->firstname));
$this->name = dol_ucwords(dol_strtolower($this->name));
$this->name_alias = isset($this->name_alias)?dol_ucwords(dol_strtolower($this->name_alias)):'';
if (property_exists($this, 'name_alias')) {
$this->name_alias = isset($this->name_alias)?dol_ucwords(dol_strtolower($this->name_alias)):'';
}
}
if (!empty($conf->global->MAIN_ALL_TO_UPPER)) {
$this->lastname = dol_strtoupper($this->lastname);
$this->name = dol_strtoupper($this->name);
$this->name_alias = dol_strtoupper($this->name_alias);
if (property_exists($this, 'name_alias')) {
$this->name_alias = dol_strtoupper($this->name_alias);
}
}
if (!empty($conf->global->MAIN_ALL_TOWN_TO_UPPER)) {
$this->address = dol_strtoupper($this->address);