Move $base_path definition to core.php to fix CLI script error

This commit is contained in:
Thomas Pike
2021-08-28 01:25:25 +02:00
parent e1d5109e65
commit be22ecf94d
2 changed files with 2 additions and 2 deletions
+2 -1
View File
@@ -15,7 +15,8 @@
## limitations under the License.
##
chdir(dirname(__FILE__));
$base_path = dirname(__FILE__);
chdir($base_path);
mb_internal_encoding('UTF-8');
date_default_timezone_set('UTC');
set_error_handler('exception_error_handler');
-1
View File
@@ -27,7 +27,6 @@ if(isset($_SERVER['PHP_AUTH_USER'])) {
}
// Work out where we are on the server
$base_path = dirname(__FILE__);
$base_url = dirname($_SERVER['SCRIPT_NAME']);
$request_url = $_SERVER['REQUEST_URI'];
$relative_request_url = preg_replace('/^'.preg_quote($base_url, '/').'/', '/', $request_url);