From 390e7dbbabee7398527c3a1552e849f5c87053aa Mon Sep 17 00:00:00 2001 From: scribu Date: Wed, 4 Jul 2012 14:07:13 +0300 Subject: [PATCH] set DOCUMENT_ROOT to the current working dir. fixes #137 --- src/php/wp-cli/wp-cli.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/php/wp-cli/wp-cli.php b/src/php/wp-cli/wp-cli.php index ca99bb70..7d42d32d 100755 --- a/src/php/wp-cli/wp-cli.php +++ b/src/php/wp-cli/wp-cli.php @@ -43,6 +43,8 @@ if ( isset( $assoc_args['help'] ) ) { unset( $assoc_args['help'] ); } +$_SERVER['DOCUMENT_ROOT'] = getcwd(); + // Define the WordPress location if ( !empty( $assoc_args['path'] ) ) { // trailingslashit() isn't available yet -- 2.11.0