From df54c6407797fa0ab807923f096289f5a5a91e89 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Sat, 30 Jul 2022 22:56:22 +0000 Subject: [PATCH] WIP: Try and fix installing on d9 --- guzzle_php81_shim.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/guzzle_php81_shim.php b/guzzle_php81_shim.php index 1c2eae37d3..5ae49d7444 100644 --- a/guzzle_php81_shim.php +++ b/guzzle_php81_shim.php @@ -2,7 +2,15 @@ namespace GuzzleHttp; -if (!function_exists('\GuzzleHttp\http_build_query')) { +try { + \Composer\InstalledVersions::getVersion('drupal/core'); + $drupalCoreInstalled = TRUE; +} +catch (\OutOfBoundsException $e) { + $drupalCoreInstalled = FALSE; +} + +if (!$drupalCoreInstalled) { /** * Generates URL-encoded query string. -- 2.25.1