mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-05 04:46:03 +01:00
Throw exception when used within the PHP builtin webserver
This commit is contained in:
@@ -102,6 +102,9 @@ class AdminPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
// Only activate admin if we're inside the admin path.
|
// Only activate admin if we're inside the admin path.
|
||||||
if ($this->active) {
|
if ($this->active) {
|
||||||
|
if (php_sapi_name() == 'cli-server') {
|
||||||
|
throw new \RuntimeException('The Admin Plugin cannot run on the PHP built-in webserver. It needs Apache, Nginx or another full-featured web server.', 500);
|
||||||
|
}
|
||||||
$this->grav['debugger']->addMessage("Admin Basic");
|
$this->grav['debugger']->addMessage("Admin Basic");
|
||||||
$this->initializeAdmin();
|
$this->initializeAdmin();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user