Skip to content
Extraits de code Groupes Projets
Valider b78c7007 rédigé par marcimat's avatar marcimat
Parcourir les fichiers

deprecate: Déprécier l’usage des fichiers de langue peuplant une variable globale.

parent 07aa9c90
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -149,6 +149,7 @@ function lire_fichier_langue(string $fichier): array {
$GLOBALS['idx_lang'] = $idx_lang_before;
if (!is_array($idx_lang)) {
if (isset($GLOBALS[$idx_lang_tmp]) && is_array($GLOBALS[$idx_lang_tmp])) {
trigger_deprecation('spip', '5.0', sprintf('Lang file "%s" populating a GLOBALS is deprecated. Return an array instead.', $fichier));
$idx_lang = $GLOBALS[$idx_lang_tmp];
} else {
$idx_lang = [];
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter