Add release-notes/5.51.2.md
[civicrm-core.git] / guzzle_php81_shim.php
index 1c2eae37d3621e430bc05f3475dde4657ebe0821..5ae49d744467b57c858492663aee3ce143cd1e4e 100644 (file)
@@ -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.