From d1803ebe2e2c67e6a6f723151bd79d8583819faa Mon Sep 17 00:00:00 2001 From: Joshua Priddle Date: Mon, 9 Oct 2017 13:27:36 -0400 Subject: [PATCH] Work around PHP notice with WP_ADMIN flag --- command.php | 1 + 1 file changed, 1 insertion(+) diff --git a/command.php b/command.php index 3da1314..4495c03 100644 --- a/command.php +++ b/command.php @@ -696,6 +696,7 @@ private function debug() { WP_CLI::add_hook("before_wp_config_load", function() { if (!defined("WP_ADMIN") && getenv("WP_ADMIN")) { define("WP_ADMIN", true); + $_SERVER["PHP_SELF"] = "/wp-admin/index.php"; WP_CLI::debug("defined WP_ADMIN"); } });