#URL_ACTION_AUTEUR{truc} génère un Warning
#URL_ACTION_AUTEUR{truc} génère un Warning: Missing argument 2 for generer_action_auteur()
La balise accepte 3 paramètres. Les 2 premiers sont obligatoires https://git.spip.net/spip/spip/src/branch/master/ecrire/balise/url_.php#L353
#URL_ACTION_AUTEUR{truc} -> KO #URL_ACTION_AUTEUR{truc, ''} -> KO #URL_ACTION_AUTEUR{truc, '', ''} -> KO
mais : #URL_ACTION_AUTEUR{truc, machin} -> OK : spip.php?action=truc&arg=machin&hash=... #URL_ACTION_AUTEUR{truc, '', machin} -> OK : spip.php?action=truc&arg=&hash=...&redirect=machin
Ça me parait incohérent (dans le deuxième cas, on passe bien un arg vide) Et pourquoi rendre l'arg obligatoire ? J'ai des actions comme "exporter" par exemple, qui ne nécessitent pas d'arguments.
Et la doc est fausse actuellement, ou bien il y a eu une régression : https://www.spip.net/fr_article6409.html#URL_ACTION_AUTEUR
En changeant la signature de la fonction generer_action_auteur avec ($action, $arg = '', $redirect = '',...), plus de warning. https://git.spip.net/spip/spip/src/branch/master/ecrire/inc/actions.php#L45