Skip to content
Snippets Groups Projects
Commit c8a4194c authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Le code erreur errno du gestionnaire de base renvoi 0 plutot que DB_ERROR_0 si pas d'erreur

parent b283bdf9
No related branches found
No related tags found
No related merge requests found
......@@ -507,7 +507,8 @@ class DoliDb
if (isset($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 'DB_ERROR';
$errno=pg_last_error($this->db);
return ($errno?'DB_ERROR':'0');
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment