[web-master] main: Fixed ValueError in case icalendar_url was set, but an empty string

From: Date: Wed, 07 Feb 2024 17:01:30 +0000
Subject: [web-master] main: Fixed ValueError in case icalendar_url was set, but an empty string
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-31405@lists.php.net to get a copy of this message
Author: Derick Rethans (derickr) Date: 2024-02-07T16:47:42Z Commit: https://github.com/php/web-master/commit/0c2ca68668135fe4bd0ea8d7fd24f54cff4b6395 Raw diff: https://github.com/php/web-master/commit/0c2ca68668135fe4bd0ea8d7fd24f54cff4b6395.diff Fixed ValueError in case icalendar_url was set, but an empty string Changed paths: M scripts/usergroups_update_infos Diff: diff --git a/scripts/usergroups_update_infos b/scripts/usergroups_update_infos index dc4bf46..6ac50a0 100644 --- a/scripts/usergroups_update_infos +++ b/scripts/usergroups_update_infos @@ -17,7 +17,11 @@ function usergroups_update_infos($root) if (! isset($group['icalendar_url'])) { continue; } - $url = $group['icalendar_url']; + $url = trim($group['icalendar_url']); + if ($url === '') { + continue; + } + $usergroupIcalFileCache = $root . "/backend/events/" . md5($url); if (strncmp("webcal://", $url, strlen("webcal://")) == 0) { $url = str_replace("webcal://", "http://", $url);

« previous php.webmaster (#31405) next »