From 1d417f8b4dfbf93e82148d7e9a35e5b3cde5cf53 Mon Sep 17 00:00:00 2001 From: Brandon Date: Thu, 18 Jul 2024 12:56:03 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Disable=20the=20relative=20URL?= =?UTF-8?q?=20module=20while=20running=20in=20console=20(Fixes=20#13)=20(#?= =?UTF-8?q?14)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Modules/RelativeUrlsModule.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Modules/RelativeUrlsModule.php b/src/Modules/RelativeUrlsModule.php index 21a2f7a..af19831 100644 --- a/src/Modules/RelativeUrlsModule.php +++ b/src/Modules/RelativeUrlsModule.php @@ -12,6 +12,7 @@ class RelativeUrlsModule extends AbstractModule protected function enabled(): bool { return parent::enabled() + && ! $this->app->runningInConsole() && ! isset($_GET['sitemap']) && ! in_array($GLOBALS['pagenow'], ['wp-login.php', 'wp-register.php'], true); }