From 1e3383a77ff48e718b9571d323acc3e90170784d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 16 Apr 2019 14:09:30 +0000 Subject: [PATCH] Improved explanation of PHP opening tag error. --- WEB-INF/templates/footer.tpl | 2 +- dbinstall.php | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 8a94de69..7a92bb55 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.65.4946 | Copyright © Anuko | +  Anuko Time Tracker 1.18.65.4947 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index 6e5b1b25..20819aee 100644 --- a/dbinstall.php +++ b/dbinstall.php @@ -91,12 +91,15 @@ if ($request->isGet()) { echo('WEB-INF/config.php file exists.
'); // Config file must start with the PHP opening tag. We are checking this because - // a Unicode editor may insert a byte order mark (BOM) before it. This is not good as it will - // spit white space before output in some situations such as in PDF reports. + // a Unicode editor may insert a byte order mark (BOM) before it. + // This is not good as it is printed as unintentional white space in output. + // Consequences: + // 1) PHP redirects may stop working, depending on server settings. + // 2) PDF reports will become unusable (cannot open files). $file = fopen(APP_DIR.'/WEB-INF/config.php', 'r'); $line = fgets($file); if (strcmp("Error: WEB-INF/config.php file does not start with PHP opening tag.
'); + echo('Error: WEB-INF/config.php file does not start with a PHP opening tag. See explanation.
'); } fclose($file); } else { -- 2.20.1