Fixed "headers already sent" error in installer

This commit is contained in:
Wruczek 2018-12-29 17:52:07 +01:00
parent ecdc0e6540
commit 8e606ad331
2 changed files with 6 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
.idea
PROTOTYPING
tools
src/installer/cache
src/private/cache
src/private/vendor

View File

@ -22,6 +22,10 @@ error_reporting(E_ALL);
set_time_limit(0);
$stepNumber = empty($_GET["step"]) || !file_exists(__DIR__ . "/pages/" . (int)$_GET["step"] . ".php") ? 1 : (int) $_GET["step"];
ob_start();
require __DIR__ . "/pages/$stepNumber.php";
$pageContent = ob_get_clean();
?>
<!DOCTYPE html>
<html>
@ -80,7 +84,7 @@ $stepNumber = empty($_GET["step"]) || !file_exists(__DIR__ . "/pages/" . (int)$_
</ul>
</div>
<?php require_once __DIR__ . "/pages/$stepNumber.php" ?>
<?= $pageContent ?>
</div>
<script>