From d0bea1627e516470f471b4e7cc0b20508865f24e Mon Sep 17 00:00:00 2001 From: Eugene Molotov Date: Sat, 18 Jun 2022 06:02:31 +0500 Subject: [PATCH] [InstagramBridge] Fix incorrect cache timeout calculation (#2840) It is expected that getCacheTimeout returns integer. In fact it returned boolean value which lead to situation, where Instagram feeds were not cached. --- bridges/InstagramBridge.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bridges/InstagramBridge.php b/bridges/InstagramBridge.php index 11fe2357..355f7f56 100644 --- a/bridges/InstagramBridge.php +++ b/bridges/InstagramBridge.php @@ -70,7 +70,10 @@ class InstagramBridge extends BridgeAbstract { public function getCacheTimeout() { $customTimeout = $this->getOption('cache_timeout'); - return $customTimeout || parent::getCacheTimeout(); + if ($customTimeout) { + return $customTimeout; + } + return parent::getCacheTimeout(); } protected function getContents($uri) {