devaneando / Wikitten

Wikitten is a small, fast, PHP wiki, and the perfect place to store your notes, code snippets, ideas, and so on.
MIT License
736 stars 174 forks source link

Possible failure when running built-in php server #98

Closed ghost closed 5 years ago

ghost commented 5 years ago

In routing.php new code has been added:

<?php
if (!defined('APP_STARTED')) {
    die('Forbidden!');
}

But, wouldn't APP_STARTED be false when runningphp -S 0.0.0.0:8888 routing.php? Because, routing.php has not had a chance to run index.php where APP_STARTED is set to true?

Steven

devaneando commented 5 years ago

Yeap, you are right.

Since I do not use the builtin web server, I would never notice.

I added a fix and already pushed it.

Just update your master branch and this problem should be gone