diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-09-29 15:00:11 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-09-29 18:57:22 +0200 |
commit | ab58f2542072e6bf34acd862f6cfed84b33feb29 (patch) | |
tree | a773a2ad2b98cd8e68c6f3c45c294e036cf3bd41 /application | |
parent | a5a9cf23acd1248585173aa32757d9720b5f2d62 (diff) | |
download | Shaarli-ab58f2542072e6bf34acd862f6cfed84b33feb29.tar.gz Shaarli-ab58f2542072e6bf34acd862f6cfed84b33feb29.tar.zst Shaarli-ab58f2542072e6bf34acd862f6cfed84b33feb29.zip |
Compatibility with PHP 8
Diffstat (limited to 'application')
-rw-r--r-- | application/config/ConfigJson.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/application/config/ConfigJson.php b/application/config/ConfigJson.php index 4509357c..c0c0dab9 100644 --- a/application/config/ConfigJson.php +++ b/application/config/ConfigJson.php | |||
@@ -46,7 +46,7 @@ class ConfigJson implements ConfigIO | |||
46 | // JSON_PRETTY_PRINT is available from PHP 5.4. | 46 | // JSON_PRETTY_PRINT is available from PHP 5.4. |
47 | $print = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 0; | 47 | $print = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 0; |
48 | $data = self::getPhpHeaders() . json_encode($conf, $print) . self::getPhpSuffix(); | 48 | $data = self::getPhpHeaders() . json_encode($conf, $print) . self::getPhpSuffix(); |
49 | if (!file_put_contents($filepath, $data)) { | 49 | if (empty($filepath) || !file_put_contents($filepath, $data)) { |
50 | throw new \Shaarli\Exceptions\IOException( | 50 | throw new \Shaarli\Exceptions\IOException( |
51 | $filepath, | 51 | $filepath, |
52 | t('Shaarli could not create the config file. '. | 52 | t('Shaarli could not create the config file. '. |