Skip to content
Extraits de code Groupes Projets
Valider 837f9b54 rédigé par nicod's avatar nicod
Parcourir les fichiers

Robustifier la fonction d'encodage

parent 729161bd
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -20,7 +20,7 @@ if (!defined('_ECRIRE_INC_VERSION')) { ...@@ -20,7 +20,7 @@ if (!defined('_ECRIRE_INC_VERSION')) {
* @return false|string * @return false|string
*/ */
function blocks_serialize($data) { function blocks_serialize($data) {
return json_encode($data); return ($data && is_array($data)) ? json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_NUMERIC_CHECK) : '';
} }
/** /**
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter