diff --git a/build/api/core/Authentification.php b/build/api/core/Authentification.php index 48c4a3c..a2748df 100644 --- a/build/api/core/Authentification.php +++ b/build/api/core/Authentification.php @@ -59,7 +59,10 @@ /* (3) Gestion de AUTH en fonction du token ---------------------------------------------------------*/ - $GLOBALS['TOKEN'] = preg_match('/^[a-f0-9]{64}$/', $GLOBALS['TOKEN'], $match) ? $match[0] : null; + if( preg_match('/^[a-f0-9]{64}$/', $GLOBALS['TOKEN'], $match) ) + $GLOBALS['TOKEN'] = $match[0]; + else + $GLOBALS['TOKEN'] = null; /* (4) On vérifie l'authentification par BDD ---------------------------------------------------------*/