[openresultat-Commits] r1541 - trunk/obj

1 view
Skip to first unread message

cga...@users.adullact.net

unread,
May 31, 2024, 8:35:16 AMMay 31
to openmairie-...@googlegroups.com
Author: cgarcin
Date: 2024-05-31 14:35:13 +0200 (Fri, 31 May 2024)
New Revision: 1541

Modified:
trunk/obj/import_specific.class.php
Log:
fix : Trying to get property 'bureau_vote' of non-object in obj/import_specific.class.php on line 824


Modified: trunk/obj/import_specific.class.php
===================================================================
--- trunk/obj/import_specific.class.php 2024-05-31 08:06:43 UTC (rev 1540)
+++ trunk/obj/import_specific.class.php 2024-05-31 12:35:13 UTC (rev 1541)
@@ -821,6 +821,10 @@
'idx' => 0
));
// Dump de l'objet
+ if(empty($xml->election)) {
+ $this->f->displayMessage('error', "Le fichier ne contiens aucune élection permettant d\'importer des candidats.");
+ return;
+ }
$bureau_vote = $xml->election->bureaux_vote->bureau_vote;
$found = false;
$nouveaux_candidats_crees = 0;

Reply all
Reply to author
Forward
0 new messages