diff --git a/application/config/ConfigJson.php b/application/config/ConfigJson.php index c0c0dab9..23b22269 100644 --- a/application/config/ConfigJson.php +++ b/application/config/ConfigJson.php @@ -19,7 +19,7 @@ public function read($filepath) $data = file_get_contents($filepath); $data = str_replace(self::getPhpHeaders(), '', $data); $data = str_replace(self::getPhpSuffix(), '', $data); - $data = json_decode($data, true); + $data = json_decode(trim($data), true); if ($data === null) { $errorCode = json_last_error(); $error = sprintf( @@ -73,7 +73,7 @@ public function getExtension() */ public static function getPhpHeaders() { - return ''; + return '*/ ?>'; } }