LSerror : fix error formatting when no error code is provided

This commit is contained in:
Benjamin Renard 2019-06-17 13:34:02 +02:00
parent 22dd1a61e6
commit fa96fc42ab

View file

@ -132,7 +132,7 @@ class LSerror {
* @retvat string Le texte des erreurs
*/
private static function getError($error) {
return "(Code ".htmlentities($error[0]).") ".htmlentities(getFData(self :: $_errorCodes[$error[0]]['msg'],$error[1]));
return ($error[0]?"(Code ".htmlentities($error[0]).") ":"").htmlentities(getFData(self :: $_errorCodes[$error[0]]['msg'],$error[1]));
}
/**