Skip to content
Snippets Groups Projects
Commit fa748fd7 authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FIX #11487 TIME 0:40 remove extra ',' in custom lang file if needed

parent b8c49b99
No related branches found
No related tags found
No related merge requests found
...@@ -115,7 +115,16 @@ class CoreConfigModel ...@@ -115,7 +115,16 @@ class CoreConfigModel
$strpos = strpos($fileContent, "="); $strpos = strpos($fileContent, "=");
$substr = substr(trim($fileContent), $strpos + 2, -1); $substr = substr(trim($fileContent), $strpos + 2, -1);
return json_decode($substr); $decode = json_decode($substr);
if (json_last_error() != JSON_ERROR_NONE) {
// decoded String is not a valid JSON String, probably because of an extra ',' at the end
$correctedString = substr_replace($substr, '', strlen($substr) - 2, 1);
$decode = json_decode($correctedString);
}
return $decode;
} }
return ''; return '';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment