From 62af444821d33603efb10c4195cc456e1ed76a90 Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Tue, 16 Feb 2021 12:51:14 -0800 Subject: [PATCH] Check if SODIUM_LIBRARY_VERSION is defined --- src/Composer/Repository/PlatformRepository.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Composer/Repository/PlatformRepository.php b/src/Composer/Repository/PlatformRepository.php index 72ae71ba9..f0ae43d13 100644 --- a/src/Composer/Repository/PlatformRepository.php +++ b/src/Composer/Repository/PlatformRepository.php @@ -402,7 +402,9 @@ class PlatformRepository extends ArrayRepository case 'libsodium': case 'sodium': - $this->addLibrary('libsodium', $this->runtime->getConstant('SODIUM_LIBRARY_VERSION')); + if ($this->runtime->hasConstant('SODIUM_LIBRARY_VERSION')) { + $this->addLibrary('libsodium', $this->runtime->getConstant('SODIUM_LIBRARY_VERSION')); + } break; case 'sqlite3':