Browse Source

fix deprecated access to GET variable

master
Dominik Schmidt-Philipp 1 day ago
parent
commit
23efb7abff
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      index.php

+ 4
- 2
index.php View File

$languages = [$languages]; $languages = [$languages];
} }
$f3->set('default_lang', array_shift($languages)); $f3->set('default_lang', array_shift($languages));
if (in_array(strtolower($f3->get('GET.lang')), $languages)) {
$f3->set('LANG', strtolower($f3->get('GET.lang')));

$getLang = null !== $f3->get('GET.lang') ? strtolower($f3->get('GET.lang')) : false;
if (isset($getLang) && in_array($getLang, $languages)) {
$f3->set('LANG', $getLang);
} else { } else {
$f3->set('LANG', $f3->get('default_lang')); $f3->set('LANG', $f3->get('default_lang'));
} }

Loading…
Cancel
Save