diff --git a/includes/ICS/Import.php b/includes/ICS/Import.php index 1c3db637..9eff26f4 100644 --- a/includes/ICS/Import.php +++ b/includes/ICS/Import.php @@ -16,12 +16,13 @@ class Import /** * getEvents * - * @param string $url + * @param integer $feedID * @param boolean $cache + * @param integer $pastDays * @param integer $limitDays * @return mixed */ - public static function getEvents(string $feedID, bool $cache = true, int $pastDays = 365, int $limitDays = 365) + public static function getEvents(int $feedID, bool $cache = true, int $pastDays = 365, int $limitDays = 365) { $pastDays = abs($pastDays); $limitDays = abs($limitDays); @@ -46,6 +47,7 @@ public static function getEvents(string $feedID, bool $cache = true, int $pastDa // Fix URL protocol $url = get_post_meta($feedID, CalendarFeed::FEED_URL, true); + $url = $url ?: ''; if (strpos($url, 'webcal://') === 0) { $url = str_replace('webcal://', 'https://', $url); } diff --git a/rrze-calendar.php b/rrze-calendar.php index c5afc94f..f726eb66 100644 --- a/rrze-calendar.php +++ b/rrze-calendar.php @@ -4,7 +4,7 @@ Plugin Name: RRZE Calendar Plugin URI: https://github.com/RRZE-Webteam/rrze-calendar Description: Import and output of FAU public events. -Version: 2.0.10 +Version: 2.0.11 Author: RRZE Webteam Author URI: https://blogs.fau.de/webworking/ License: GNU General Public License v3.0 @@ -21,8 +21,8 @@ use RRZE\Calendar\CPT\CalendarFeed; use RRZE\WP\Plugin; -const RRZE_PHP_VERSION = '8.0'; -const RRZE_WP_VERSION = '6.3'; +const RRZE_PHP_VERSION = '8.1'; +const RRZE_WP_VERSION = '6.4'; // Autoloader require_once 'vendor/autoload.php';