diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-10-27 19:27:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-27 19:27:06 +0100 |
commit | 034c1ce5269956ec43448f9fd2959e094c861004 (patch) | |
tree | bcfaa7c95f1e9017f557c7107a100185a7fbcf4f /application | |
parent | 820cae27cfcc94af552818f3f1e5342e00478f6c (diff) | |
parent | e69e3fef7bbdc7299ae01aa0e0258395d2e49818 (diff) | |
download | Shaarli-034c1ce5269956ec43448f9fd2959e094c861004.tar.gz Shaarli-034c1ce5269956ec43448f9fd2959e094c861004.tar.zst Shaarli-034c1ce5269956ec43448f9fd2959e094c861004.zip |
Merge pull request #1609 from GaneshKandu/patch-1
Diffstat (limited to 'application')
-rw-r--r-- | application/config/ConfigJson.php | 6 |
1 files changed, 3 insertions, 3 deletions
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 @@ class ConfigJson implements ConfigIO | |||
19 | $data = file_get_contents($filepath); | 19 | $data = file_get_contents($filepath); |
20 | $data = str_replace(self::getPhpHeaders(), '', $data); | 20 | $data = str_replace(self::getPhpHeaders(), '', $data); |
21 | $data = str_replace(self::getPhpSuffix(), '', $data); | 21 | $data = str_replace(self::getPhpSuffix(), '', $data); |
22 | $data = json_decode($data, true); | 22 | $data = json_decode(trim($data), true); |
23 | if ($data === null) { | 23 | if ($data === null) { |
24 | $errorCode = json_last_error(); | 24 | $errorCode = json_last_error(); |
25 | $error = sprintf( | 25 | $error = sprintf( |
@@ -73,7 +73,7 @@ class ConfigJson implements ConfigIO | |||
73 | */ | 73 | */ |
74 | public static function getPhpHeaders() | 74 | public static function getPhpHeaders() |
75 | { | 75 | { |
76 | return '<?php /*'. PHP_EOL; | 76 | return '<?php /*'; |
77 | } | 77 | } |
78 | 78 | ||
79 | /** | 79 | /** |
@@ -85,6 +85,6 @@ class ConfigJson implements ConfigIO | |||
85 | */ | 85 | */ |
86 | public static function getPhpSuffix() | 86 | public static function getPhpSuffix() |
87 | { | 87 | { |
88 | return PHP_EOL . '*/ ?>'; | 88 | return '*/ ?>'; |
89 | } | 89 | } |
90 | } | 90 | } |