# FIX-03 — Variables PHP non initialisées (PHP 8.3)

**Date** : 2026-06-23
**Gravité** : 🟡 Moyenne (warnings, pas de fatal) — pollue les logs Apache
**Serveur** : 51.158.96.239 — `/var/www/toulouse`

## Symptôme (logs Apache)
```
PHP Warning: Undefined variable $size / $icon / $attrib  → single-artiste.php:34
PHP Warning: Undefined variable $retour                  → moteurArtistesTexte.php:12
PHP Warning: Undefined variable $size / $icon            → resultatArtistes.php:73
```

## Cause racine
Variables jamais initialisées avant usage. Toléré < PHP 8, devient un `Warning` bruyant en PHP 8.3.
- `$size`, `$icon`, `$attrib` passés à `wp_get_attachment_image()` → jamais définis.
  Signature : `wp_get_attachment_image( $id, $size='thumbnail', $icon=false, $attr='' )`.
  Avec `null` passé, WP retombe sur l'image full → **on fige ce comportement avec `'full'`** (rendu identique).
- `$retour` concaténé (`.=`) avant initialisation dans `moteurtextArtiste()`.

## Changements (préservent le rendu actuel)

| Fichier | Avant | Après |
|---------|-------|-------|
| `themes/toulouse-les-orgues/single-artiste.php:34` | `wp_get_attachment_image( $photo_artiste_1, $size, $icon, $attrib )` | `wp_get_attachment_image( $photo_artiste_1, 'full', false, '' )` |
| `plugins/pepille_shortcode/includes/resultatArtistes.php:73` | `wp_get_attachment_image( $image1, $size, $icon, $attrib )` | `wp_get_attachment_image( $image1, 'full', false, '' )` |
| `plugins/pepille_shortcode/includes/moteurArtistesTexte.php` | `global $texteCible;` (puis `$retour .=`) | ajout `$retour = '';` après `global` |

## Versioning
- Snapshots avant : `snapshots/{single-artiste,pepille_shortcode}/*.before-fix3.php`
- Snapshots après : `*.after-fix3.php`
- Backups serveur : `*.bak-20260623-fix3`

## Vérification
- `php -l` sur les 3 fichiers → No syntax errors
- `curl /artiste/silva-orendain/` → HTTP 200
- Plus de `Undefined variable` dans `toulouse.error.log` après nouvelles requêtes

## Statut : ✅ APPLIQUÉ
