From 235e1f68053c95dd400577c5bad547305505f147 Mon Sep 17 00:00:00 2001 From: Danny van Kooten Date: Fri, 9 Oct 2015 14:37:23 +0700 Subject: [PATCH] Cast returned transient to `array` --- includes/class-mailchimp.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/includes/class-mailchimp.php b/includes/class-mailchimp.php index 6e434d9e..fcc5b788 100644 --- a/includes/class-mailchimp.php +++ b/includes/class-mailchimp.php @@ -85,11 +85,7 @@ public function get_lists( $force_refresh = false, $force_fallback = false ) { return $lists; } else { // api request failed, get fallback data (with longer lifetime) - $cached_lists = get_transient( $this->transient_name . '_fallback' ); - - if ( ! is_array( $cached_lists ) ) { - return false; - } + $cached_lists = (array) get_transient( $this->transient_name . '_fallback' ); } }