PHP8 support

This commit is contained in:
bergware
2023-02-24 19:42:05 +01:00
parent 1219f1b89a
commit e682525652
2 changed files with 13 additions and 11 deletions
+7 -5
View File
@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2005-2020, Lime Technology
* Copyright 2012-2020, Bergware International.
/* Copyright 2005-2023, Lime Technology
* Copyright 2012-2023, Bergware International.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,
@@ -11,9 +11,11 @@
*/
?>
<?
write_log("Saving file $file");
exec("mkdir -p ".escapeshellarg(dirname($file)));
file_put_contents($file, str_replace(["\r\n","\r"], "\n", $_POST['text']));
if ($file) {
write_log("Saving file $file");
exec("mkdir -p ".escapeshellarg(dirname($file)));
file_put_contents($file, str_replace(["\r\n","\r"], "\n", $_POST['text']));
}
// discard settings
$save = false;
?>