diff --git a/src/Concrete/Adapter/AbstractApplicationEnabledAdapter.php b/src/Concrete/Adapter/AbstractApplicationEnabledAdapter.php index 4fdd32d..8427aba 100644 --- a/src/Concrete/Adapter/AbstractApplicationEnabledAdapter.php +++ b/src/Concrete/Adapter/AbstractApplicationEnabledAdapter.php @@ -8,6 +8,7 @@ use Concrete\Console\Concrete\Connection\ConnectionInterface; use Concrete\Console\Util\Installation; use Concrete\Core\Application\Application; +use Phar; abstract class AbstractApplicationEnabledAdapter implements AdapterInterface { @@ -87,7 +88,13 @@ protected function registerAutoload(string $path, string $core): void */ protected function getApplicationInstance(string $path, string $core): Application { - return require $core . '/bootstrap/start.php'; + try { + return require $core . '/bootstrap/start.php'; + } finally { + if (Phar::running() !== '' && !in_array('phar', stream_get_wrappers(), true)) { + stream_wrapper_restore('phar'); + } + } } /**