test 4 verificaiton d'un index de vote invalide

+ correction php
This commit is contained in:
philippe lhardy
2025-06-23 10:21:28 +02:00
parent 502ea0aeaf
commit b7d7fdf8a3
4 changed files with 95 additions and 1 deletions

View File

@@ -57,7 +57,7 @@ foreach ($votes as $vote) {
foreach ( $vote as $candidat => $mention ) {
if ($mention > $default_mention or $mention < 0) {
$mention = $default_mention;
$warnings.append("index de mention invalide, soit la liste des mentions est erronnée soit la mention dans le vote est erronée");
array_push($warnings,"index de mention invalide, soit la liste des mentions est erronnée soit la mention dans le vote est erronée");
}
if ( array_key_exists($candidat,$collect)) {
if ( array_key_exists($mention,$collect[$candidat])) {