]> wagnertech.de Git - timetracker.git/blobdiff - dbinstall.php
Fixed environment check for PHP opening tag in config.php for Windows systems.
[timetracker.git] / dbinstall.php
index 4d4de7e8e232e9ece7c212186ef6a382289473fa..07cb37d765dc689be506a1d491f7edd1d41621a6 100755 (executable)
@@ -61,7 +61,7 @@ if ($request->isGet()) {
     // spit white space before output in some situations such as in PDF reports.
     $file = fopen(APP_DIR.'/WEB-INF/config.php', 'r');
     $line = fgets($file);
-    if (strcmp('<?php'.PHP_EOL, $line) !== 0) {
+    if (strcmp("<?php\n", $line) !== 0 && strcmp("<?php\r\n", $line) !== 0) {
       echo('<font color="red">Error: WEB-INF/config.php file does not start with PHP opening tag.</font><br>');
     }
     fclose($file);