From: Platonides Date: Mon, 21 May 2018 21:23:10 +0000 (+0200) Subject: $D[$C] puede ser un string, lo que genera numerosos warnings X-Git-Url: http://gitweb.wikimedia.es/?a=commitdiff_plain;h=426cd39eb373ad670be21ce13e34516dab3f94cc;p=inscripciones%2Finscribirse $D[$C] puede ser un string, lo que genera numerosos warnings --- diff --git a/html/wiki.php b/html/wiki.php index 9681e4c..dfbc6a5 100644 --- a/html/wiki.php +++ b/html/wiki.php @@ -9,7 +9,7 @@ function parsecfg ($F) { # Se admiten matrices numéricas $D[$CC[0]][$CC[1]] = $V; } else { $D[$C] = strpos ($V, ";") !== FALSE && strpos ($V, "[[") === FALSE && strpos ($V, "<") === FALSE ? explode (";", $V) : $V; - if (! end ($D[$C])) array_pop ($D[$C]); # Eliminar último elemento vacío (normalmente por ; final que fuerza array) + if (is_array($D[$C]) && ! end ($D[$C])) array_pop ($D[$C]); # Eliminar último elemento vacío (normalmente por ; final que fuerza array) } } return $D;