MyBB.support, le portail francophone de MyBB
mybb error (myreactions) - Version imprimable

+- MyBB.support, le portail francophone de MyBB (http://mybb.fr)
+-- Forum : Plug-ins et modules pour MyBB (http://mybb.fr/forum-32.html)
+--- Forum : Support (http://mybb.fr/forum-15.html)
+--- Sujet : mybb error (myreactions) (/thread-7683.html)



mybb error (myreactions) - sc4t - 02-02-2017


VERSION_MyBB : MyBB 1.8.10
Bonjour!

J'ai reçus un email de mon forum avec comme texte:

Your copy of MyBB running on Scooter Chinois 4T (http://www.scooter-chinois-4t.com/forum) has experienced an error. Details of the error include:
---
Type: 2
File: inc/plugins/myreactions.php (Line no. 402)
Message
array_key_exists() expects parameter 2 to be array, null given.


[attachment=1624]

Je ne comprend pas l'erreur. 


RE: mybb error (myreactions) - exdiogene - 02-02-2017

Cette erreur est causée par la nouvelle version de PHP qui veut que les types de variables soient corrects.

Pour éviter cette erreur sans mettre à jour le plugin, il suffit de modifier la ligne 402 :

Code PHP :
   if(array_key_exists($post['pid'], $thread_reactions)) 


par

Code PHP :
   if(array_key_exists($post['pid'], (array) $thread_reactions)) 



RE: mybb error (myreactions) - sc4t - 02-02-2017

Merci exdiogene


 Utilitaire de traduction fourni par Regentronique