From 8f680c969cf65d744463813670f753e4c81d492c Mon Sep 17 00:00:00 2001 From: Adam Rahwane Date: Mon, 28 Aug 2023 12:01:28 +0300 Subject: [PATCH] make sure cloudinary module is enabled before attempting to get cname in media library helper --- Helper/MediaLibraryHelper.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Helper/MediaLibraryHelper.php b/Helper/MediaLibraryHelper.php index 4d0376c..30d01f5 100644 --- a/Helper/MediaLibraryHelper.php +++ b/Helper/MediaLibraryHelper.php @@ -106,7 +106,6 @@ public function getCloudinaryMLshowOptions($resourceType = null, $path = "") */ public function getCname() { - $cname = isset($this->configuration->getCredentials()['cname']) ? $this->configuration->getCredentials()['cname'] : null; - return $cname; + return $this->configuration->isEnabled() && isset($this->configuration->getCredentials()['cname']) ? $this->configuration->getCredentials()['cname'] : null; } }