Re: des PHP Warning en 3.2.11 up de ce matin

Matthieu Marcillaud <[email protected]>
Newsgroups gmane.comp.web.spip.devel
Message-ID <[email protected]>
Salut,

La trace peut être utile dans ce cas là, mais il semblerait que tu 
appelles typo() et/ou generer_url_ecrire() d'une manière ou d'une autre 
dans ton fichier config/mes_options.php, c'est à dire avant le 
chargement complet de SPIP (avant spip_initialisation_suite()), ce qui 
provoque des bugs.

config/mes_options.php n'est pas là pour faire des traitements (il 
arrive avant l'initialisation complète de SPIP justement pour interférer 
dessus).

Donc, merci de donner plus de contexte.

On pourrait faire par exemple dans ces fonctions un brut :
if (!defined('_PROTOCOLES_STD')) {
	throw new \RuntimeError("Function called before SPIP initialisation.");
}

Ou ce genre de chose. Au moins ce serait clair :p

MM.

Le 02/04/2021 à 09:41, RealET a écrit :
> Bonjour,
> 
> J'ai ceci :
> PHP Warning:  Use of undefined constant _PROTOCOLES_STD - assumed 
> '_PROTOCOLES_STD' (this will throw an Error in a future version of PHP) 
> in /home/www/ecrire/inc/lien.php on line 105
> PHP Warning:  Use of undefined constant _SPIP_ECRIRE_SCRIPT - assumed 
> '_SPIP_ECRIRE_SCRIPT' (this will throw an Error in a future version of 
> PHP) in /home/www/ecrire/inc/utils.php on line 2044
> 
> En PHP 7.2
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.