diff options
| author | Moritz Strohm <strohm@data-quest.de> | 2024-01-29 15:16:24 +0000 |
|---|---|---|
| committer | Moritz Strohm <strohm@data-quest.de> | 2024-01-29 15:16:24 +0000 |
| commit | 7c1df847d94d3956bc763b94b73cebfe108dc9a1 (patch) | |
| tree | e18e003bff65c5bf0748c644d6cd3d235cb1feca /lib/classes/IcalExport.php | |
| parent | da0110d5e85279123e8dde392cb4c926397238bf (diff) | |
StEP 01354, closes #1354
Closes #1354
Merge request studip/studip!2116
Diffstat (limited to 'lib/classes/IcalExport.php')
| -rw-r--r-- | lib/classes/IcalExport.php | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/classes/IcalExport.php b/lib/classes/IcalExport.php index f011c5e..2bb16d5 100644 --- a/lib/classes/IcalExport.php +++ b/lib/classes/IcalExport.php @@ -50,18 +50,25 @@ class IcalExport while ($length--) { while (1) { $rnd = rand(48, 122); - if ($rnd < 48) + if ($rnd < 48) { continue; - if ($rnd > 57 && $rnd < 65) + } + if ($rnd > 57 && $rnd < 65) { continue; - if ($rnd > 90 && $rnd < 97) + } + if ($rnd > 90 && $rnd < 97) { continue; - if ($rnd > 122) + } + if ($rnd > 122) { continue; + } $char = chr($rnd); - if ($rejected[$char] > 1) { + if (isset($rejected[$char]) && $rejected[$char] > 1) { continue; } + if (!isset($rejected[$char])) { + $rejected[$char] = 0; + } $rejected[$char]++; $ret .= $char; break; |
