diff --git a/classes/patreon_wordpress.php b/classes/patreon_wordpress.php index e9aebed..6d727fe 100644 --- a/classes/patreon_wordpress.php +++ b/classes/patreon_wordpress.php @@ -776,7 +776,8 @@ public static function getUserPatronageLevel($pledge) } // Get currently entitled tiers: - + if(!is_array($pledge)) return 0; + if(empty($pledge['relationships']['currently_entitled_tiers']['data'])) return 0; $currently_entitled_tiers = $pledge['relationships']['currently_entitled_tiers']['data']; if (!is_array($currently_entitled_tiers)) {