From 55e12dcd874dab8603086ca9c0cb8b5b8ae62882 Mon Sep 17 00:00:00 2001 From: Benoit Rospars <benoit.rospars@inria.fr> Date: Wed, 7 Dec 2022 11:41:39 +0100 Subject: [PATCH] Fix ternary warning php --- app/tuto1/index.php | 2 +- app/tuto2/index.php | 2 +- app/tuto3-1/index.php | 2 +- app/tuto3-2/index.php | 2 +- app/tuto3-3/index.php | 2 +- app/tuto3-4/index.php | 2 +- app/tuto3-ai4t/index.php | 2 +- app/tuto3/index.php | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/tuto1/index.php b/app/tuto1/index.php index 732a691..5f0f92f 100644 --- a/app/tuto1/index.php +++ b/app/tuto1/index.php @@ -2,7 +2,7 @@ $currentURL = $_SERVER['REQUEST_URI']; $tutoURL = substr($currentURL, 0, strpos($currentURL, 'app/') - 1); -$lang = $_GET['lang'] ?: 'fr'; +$lang = isset($_GET['lang']) ? $_GET['lang'] : 'fr'; ?> diff --git a/app/tuto2/index.php b/app/tuto2/index.php index 3d30016..7a40f46 100644 --- a/app/tuto2/index.php +++ b/app/tuto2/index.php @@ -2,7 +2,7 @@ $currentURL = $_SERVER['REQUEST_URI']; $tutoURL = substr($currentURL, 0, strpos($currentURL, 'app/') - 1); -$lang = $_GET['lang'] ?: 'fr'; +$lang = isset($_GET['lang']) ? $_GET['lang'] : 'fr'; ?> diff --git a/app/tuto3-1/index.php b/app/tuto3-1/index.php index c8c9ecb..f5ce6ad 100644 --- a/app/tuto3-1/index.php +++ b/app/tuto3-1/index.php @@ -2,7 +2,7 @@ $currentURL = $_SERVER['REQUEST_URI']; $tutoURL = substr($currentURL, 0, strpos($currentURL, 'app/') - 1); -$lang = $_GET['lang'] ?: 'fr'; +$lang = isset($_GET['lang']) ? $_GET['lang'] : 'fr'; ?> diff --git a/app/tuto3-2/index.php b/app/tuto3-2/index.php index 10fed6d..c98ed8c 100644 --- a/app/tuto3-2/index.php +++ b/app/tuto3-2/index.php @@ -2,7 +2,7 @@ $currentURL = $_SERVER['REQUEST_URI']; $tutoURL = substr($currentURL, 0, strpos($currentURL, 'app/') - 1); -$lang = $_GET['lang'] ?: 'fr'; +$lang = isset($_GET['lang']) ? $_GET['lang'] : 'fr'; ?> diff --git a/app/tuto3-3/index.php b/app/tuto3-3/index.php index ae661ca..bed6735 100644 --- a/app/tuto3-3/index.php +++ b/app/tuto3-3/index.php @@ -2,7 +2,7 @@ $currentURL = $_SERVER['REQUEST_URI']; $tutoURL = substr($currentURL, 0, strpos($currentURL, 'app/') - 1); -$lang = $_GET['lang'] ?: 'fr'; +$lang = isset($_GET['lang']) ? $_GET['lang'] : 'fr'; ?> diff --git a/app/tuto3-4/index.php b/app/tuto3-4/index.php index abed35e..3ad67a5 100644 --- a/app/tuto3-4/index.php +++ b/app/tuto3-4/index.php @@ -2,7 +2,7 @@ $currentURL = $_SERVER['REQUEST_URI']; $tutoURL = substr($currentURL, 0, strpos($currentURL, 'app/') - 1); -$lang = $_GET['lang'] ?: 'fr'; +$lang = isset($_GET['lang']) ? $_GET['lang'] : 'fr'; ?> diff --git a/app/tuto3-ai4t/index.php b/app/tuto3-ai4t/index.php index 738c139..789e527 100644 --- a/app/tuto3-ai4t/index.php +++ b/app/tuto3-ai4t/index.php @@ -2,7 +2,7 @@ $currentURL = $_SERVER['REQUEST_URI']; $tutoURL = substr($currentURL, 0, strpos($currentURL, 'app/') - 1); -$lang = $_GET['lang'] ?: 'fr'; +$lang = isset($_GET['lang']) ? $_GET['lang'] : 'fr'; ?> diff --git a/app/tuto3/index.php b/app/tuto3/index.php index bd6c740..8ab34ac 100644 --- a/app/tuto3/index.php +++ b/app/tuto3/index.php @@ -2,7 +2,7 @@ $currentURL = $_SERVER['REQUEST_URI']; $tutoURL = substr($currentURL, 0, strpos($currentURL, 'app/') - 1); -$lang = $_GET['lang'] ?: 'fr'; +$lang = isset($_GET['lang']) ? $_GET['lang'] : 'fr'; $arrayPages=explode("?",$currentURL); //var_dump($arrayPages); if(count($arrayPages)==2){ -- GitLab