Anomalie #32181
Mis à jour par Emmanuel DILLARD il y a 29 jours
```
Bonjour,
Notre client nous remonte un message d'erreur JSON lors d'une recherche sur le critère annotation.
Un contournent a été trouvé dans le fichier /var/www/html/MaarchCourrier/src/app/search/controllers/SearchController.php, à la ligne 828

Nous avons remplacé
if ($note['user_id'] == $GLOBALS['id']) {
par
if ($note['user_id'] ?? '' == $GLOBALS['id']) {
Pouvez-vous analyser et nous aider à corriger l'erreur de façon pérenne ?
version Maarch Courrier 2301.4.0 et MaarchCapture 2.0
```
En tant qu'utilisateur je fais une recherche avancée avec comme critère "annotation"
J'ai une erreur **Unexpected token '<' " " ... is not valid JSON** qui pop
Dans la console :

Proposition de correctif par le client dans le fichier : /var/www/html/MaarchCourrier/src/app/search/controllers/**SearchController.php**
Remplacé
```
if ($note['user_id'] == $GLOBALS['id']) {
```
par
```
if ($note['user_id'] ?? '' == $GLOBALS['id']) {
```
Non reproduit sur nos instances (pas de warning actif)
Cible : 2301 et 24