Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning PHP depuis la dernière mise à jour #138

Open
nahuelange opened this issue Jan 6, 2023 · 5 comments
Open

Warning PHP depuis la dernière mise à jour #138

nahuelange opened this issue Jan 6, 2023 · 5 comments
Assignees

Comments

@nahuelange
Copy link
Contributor

Bonjour,

Depuis la dernière mise à jour de sécurité, un warning PHP est soulevé systématiquement à l'édition d'une entité.

https://github.com/OpenEdition/lodel/blob/master/lodel/scripts/context.php#L253
La valeur de $v est un tableau, preg_match ne peut pas fonctionner sur les tableaux.

@lnprieto @jcsouplet

@brrd
Copy link
Contributor

brrd commented Jan 18, 2023

@lnprieto peut-on espérer un correctif dans les prochaines semaines ?

Pour info, voici le message d'erreur :

PHP Error (Warning) in file 'chemin/vers/lodel/lodel/scripts/context.php' on line 253 : 
preg_match() expects parameter 2 to be string, array given

Warnings seem to appear on this page. You may go on anyway by following this link. Please report the problem to help us to improve Lodel.

@lnprieto
Copy link
Contributor

lnprieto commented Jan 19, 2023 via email

@brrd
Copy link
Contributor

brrd commented Jan 20, 2023

@lnprieto merci

@nahuelange
Copy link
Contributor Author

Bonjour,
Malgré le patch, le problème persiste. La récursivité des array n'ayant pas été prise en compte. Prévoyez-vous de déployer un nouveau correctif ?

@brrd
Copy link
Contributor

brrd commented Apr 3, 2024

FTR, ce problème est toujours d'actualité et assez gênant à l'utilisation sous environnement de développement.

image

Le code teste bien le type array mais ne prends pas en compte le fait qu'un array peut lui-même contenir un array.

Voir ligne 256 : a921de2#diff-c5c7a83d86838b3c576d3a2ecdd448de07b095aacc256888e43621bc49267467

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants