From bb0900093d29c5847f67dbc9464157e44a59d743 Mon Sep 17 00:00:00 2001 From: Art4 Date: Sat, 28 Dec 2024 22:39:20 +0000 Subject: [PATCH] refactor chdir() call --- bin/jetstream.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/bin/jetstream.php b/bin/jetstream.php index c4075ff652..9764c38e51 100755 --- a/bin/jetstream.php +++ b/bin/jetstream.php @@ -23,16 +23,7 @@ if (php_sapi_name() !== 'cli') { } // Ensure that Jetstream.php is executed from the base path of the installation -if (!file_exists('index.php') && (sizeof((array)$_SERVER['argv']) != 0)) { - $directory = dirname($_SERVER['argv'][0]); - - if (substr($directory, 0, 1) != '/') { - $directory = $_SERVER['PWD'] . '/' . $directory; - } - $directory = realpath($directory . '/..'); - - chdir($directory); -} +chdir(dirname(__DIR__)); require dirname(__DIR__) . '/vendor/autoload.php';