diff --git a/htdocs/admin/system/phpinfo.php b/htdocs/admin/system/phpinfo.php
index 11d0dbc49cf..da21d52cd43 100644
--- a/htdocs/admin/system/phpinfo.php
+++ b/htdocs/admin/system/phpinfo.php
@@ -105,36 +105,39 @@ if (!isset($_GET["testget"]) && !isset($_POST["testpost"]) && !isset($_GET["main
print '';
print '
| Sessions support | ';
-
if (!function_exists("session_id"))
{
print ' '.$langs->trans("ErrorPHPDoesNotSupportSessions");
} else {
print ' '.$langs->trans("PHPSupportSessions");
}
-
print ' |
';
print '| UTF-8 support | ';
-
if (!function_exists("utf8_encode"))
{
print ' '.$langs->trans("ErrorPHPDoesNotSupport", "UTF8");
} else {
print ' '.$langs->trans("PHPSupport", "UTF8");
}
-
print ' |
';
print '| MBString support | ';
-
if (!function_exists("mb_check_encoding"))
{
print ' '.$langs->trans("ErrorPHPDoesNotSupport", "mbstring");
} else {
print ' '.$langs->trans("PHPSupport", "mbstring");
}
+print ' |
';
+print '| JSon support | ';
+if (!function_exists("json_decode"))
+{
+ print ' '.$langs->trans("ErrorPHPDoesNotSupport", "json");
+} else {
+ print ' '.$langs->trans("PHPSupport", "json");
+}
print ' |
';
print '';
diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php
index dfa8b5adef6..051a2d1a42d 100644
--- a/htdocs/modulebuilder/index.php
+++ b/htdocs/modulebuilder/index.php
@@ -1200,7 +1200,7 @@ if ($dirins && $action == 'addproperty' && !empty($module) && !empty($tabobj))
if (!empty($addfieldentry['arrayofkeyval']) && !is_array($addfieldentry['arrayofkeyval']))
{
- $addfieldentry['arrayofkeyval'] = dol_json_decode($addfieldentry['arrayofkeyval'], true);
+ $addfieldentry['arrayofkeyval'] = json_decode($addfieldentry['arrayofkeyval'], true);
}
}
}
diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php
index 761365e1280..d7ca24299b0 100644
--- a/htdocs/societe/paymentmodes.php
+++ b/htdocs/societe/paymentmodes.php
@@ -611,7 +611,7 @@ if (empty($reshook))
$tokenstring['stripe_user_id'] = $stripesup->id;
$tokenstring['type'] = $stripesup->type;
$sql = "UPDATE ".MAIN_DB_PREFIX."oauth_token";
- $sql .= " SET tokenstring = '".dol_json_encode($tokenstring)."'";
+ $sql .= " SET tokenstring = '".$db->escape(json_encode($tokenstring))."'";
$sql .= " WHERE site = 'stripe' AND (site_account IS NULL or site_account = '".$db->escape($site_account)."') AND fk_soc = ".$object->id." AND service = '".$db->escape($service)."' AND entity = ".$conf->entity; // Keep = here for entity. Only 1 record must be modified !
// TODO Add site and site_account on oauth_token table
$sql .= " WHERE fk_soc = ".$object->id." AND service = '".$db->escape($service)."' AND entity = ".$conf->entity; // Keep = here for entity. Only 1 record must be modified !
@@ -630,7 +630,7 @@ if (empty($reshook))
$tokenstring['stripe_user_id'] = $stripesup->id;
$tokenstring['type'] = $stripesup->type;
$sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_token (service, fk_soc, entity, tokenstring)";
- $sql .= " VALUES ('".$db->escape($service)."', ".$object->id.", ".$conf->entity.", '".dol_json_encode($tokenstring)."')";
+ $sql .= " VALUES ('".$db->escape($service)."', ".$object->id.", ".$conf->entity.", '".$db->escape(json_encode($tokenstring))."')";
// TODO Add site and site_account on oauth_token table
} catch (Exception $e) {
$error++;
diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php
index 742072cdcc1..93f1ed066af 100644
--- a/htdocs/stripe/class/stripe.class.php
+++ b/htdocs/stripe/class/stripe.class.php
@@ -110,7 +110,7 @@ class Stripe extends CommonObject
$obj = $this->db->fetch_object($result);
$tokenstring = $obj->tokenstring;
- $tmparray = dol_json_decode($tokenstring);
+ $tmparray = json_decode($tokenstring);
$key = $tmparray->stripe_user_id;
} else {
$tokenstring = '';