From ad88dd84794a81f921756eaf72297072b677a0bf Mon Sep 17 00:00:00 2001 From: Platonides Date: Mon, 21 May 2018 23:55:40 +0200 Subject: [PATCH] =?utf8?q?Comprobar=20si=20existen=20los=20par=C3=A1metros?= =?utf8?q?=20mediante=20la=20fusi=C3=B3n=20de=20null?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Evitamos los warnings por uso de variables no definidas --- html/inscripcion.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/html/inscripcion.php b/html/inscripcion.php index 2ea6f66..4e308c8 100755 --- a/html/inscripcion.php +++ b/html/inscripcion.php @@ -57,7 +57,7 @@ if (substr ($E, -10) == "-iespecial") { # $Email = ($E == "mensa" ? "info" : $E); -$I = ($_GET["uselang"] ? $_GET["uselang"] : "es"); +$I = ($_GET["uselang"] ?? "es"); $D0 = parsecfg ("jembot.0"); $DD = parsecfg ("jembot.data"); $DU = parsecfg ("jembot.usuarios"); @@ -259,9 +259,9 @@ EOT; } # Vale tanto si el sexo o la edad son obligatorios como si no -$ValSexo = ($_POST["Sexo"] ? $_POST["Sexo"] : 0); +$ValSexo = ($_POST["Sexo"] ?? 0); $CheckSexo[$ValSexo] = "CHECKED"; -$ValEdad = ($_POST["Edad"] ? $_POST["Edad"] : 0); +$ValEdad = ($_POST["Edad"] ?? 0); $CheckEdad[$ValEdad] = "CHECKED"; ?> @@ -308,7 +308,7 @@ if (count ($Grupos) == 1) { if ($Org == "wmes") print ("

{$DI["asociadona"]}

"); print (""); -$Img = (isset($_GET["i"]) ? $_GET["i"] : $E); +$Img = ($_GET["i"] ?? $E); $Web = ($DE["web"] ? $DE["web"] : wikiencode ("https://{$DP["web"]}/wiki/", $DE["página"][$P], NULL, NULL, NULL)); foreach (array ("jpg", "png") as $Ext) { if (file_exists ("img/{$Img}.{$Ext}")) print (""); @@ -410,7 +410,7 @@ if (count ($Grupos) > 1) { "); print ("