Skip to content

Commit

Permalink
Avoid defining global variables
Browse files Browse the repository at this point in the history
  • Loading branch information
giuscris committed Nov 29, 2024
1 parent c420bd0 commit 52b27cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions formwork/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
}

// Check if Composer autoloader is available
if (file_exists($autoload = ROOT_PATH . '/vendor/autoload.php')) {
require $autoload;
if (file_exists(ROOT_PATH . '/vendor/autoload.php')) {
require ROOT_PATH . '/vendor/autoload.php';
} else {
require __DIR__ . '/views/errors/install.php';
exit;
Expand Down
3 changes: 1 addition & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@

require SYSTEM_PATH . '/bootstrap.php';

$formwork = new App();
$formwork->run();
(new App())->run();

0 comments on commit 52b27cc

Please sign in to comment.