From: Platonides Date: Mon, 21 May 2018 21:55:40 +0000 (+0200) Subject: Comprobar si existen los parámetros mediante la fusión de null X-Git-Url: http://gitweb.wikimedia.es/?a=commitdiff_plain;h=ad88dd84794a81f921756eaf72297072b677a0bf;p=inscripciones%2Finscribirse Comprobar si existen los parámetros mediante la fusión de null Evitamos los warnings por uso de variables no definidas --- 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 ("