Le code erreur errno du gestionnaire de base renvoi 0 plutot que DB_ERROR_0 si pas d'erreur
This commit is contained in:
parent
b283bdf96a
commit
c8a4194ceb
@ -507,7 +507,8 @@ class DoliDb
|
|||||||
if (isset($this->errorcode_map[mysql_errno($this->db)])) {
|
if (isset($this->errorcode_map[mysql_errno($this->db)])) {
|
||||||
return $this->errorcode_map[mysql_errno($this->db)];
|
return $this->errorcode_map[mysql_errno($this->db)];
|
||||||
}
|
}
|
||||||
return 'DB_ERROR_'.mysql_errno($this->db);
|
$errno=mysql_errno($this->db);
|
||||||
|
return ($errno?'DB_ERROR_'.$errno:'0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -503,7 +503,8 @@ class DoliDb
|
|||||||
return $code;
|
return $code;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 'DB_ERROR';
|
$errno=pg_last_error($this->db);
|
||||||
|
return ($errno?'DB_ERROR':'0');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user